Browse Source

签证类型CRUD

user5 5 years ago
parent
commit
10bb4f15d6

+ 27 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectContentDataRelevance.java

@@ -0,0 +1,27 @@
+package com.jeeplus.modules.projectcontentinfo.entity;
+
+/**
+ * 合同id、动态合同id关联表
+ * @author 徐滕
+ * @version 2020-03-25
+ */
+public class ProjectContentDataRelevance {
+    private String projectContentId;
+    private String projectContentDynamicId;
+
+    public String getProjectContentId() {
+        return projectContentId;
+    }
+
+    public void setProjectContentId(String projectContentId) {
+        this.projectContentId = projectContentId;
+    }
+
+    public String getProjectContentDynamicId() {
+        return projectContentDynamicId;
+    }
+
+    public void setProjectContentDynamicId(String projectContentDynamicId) {
+        this.projectContentDynamicId = projectContentDynamicId;
+    }
+}

+ 59 - 0
src/main/java/com/jeeplus/modules/projectcontentinfo/entity/ProjectContractContentAlterData.java

@@ -0,0 +1,59 @@
+package com.jeeplus.modules.projectcontentinfo.entity;
+
+import com.jeeplus.common.persistence.DataEntity;
+import org.apache.poi.ss.formula.functions.T;
+
+import java.math.BigDecimal;
+
+/**
+ * 项目合同数据修改展示信息表
+ * @author 徐滕
+ * @version 2020-03-25
+ */
+public class ProjectContractContentAlterData extends DataEntity<T>  {
+    private BigDecimal reviewAmt;
+    private BigDecimal setAmt;
+    private String contentId;
+    private String name;
+    private String typeName;
+
+    public BigDecimal getReviewAmt() {
+        return reviewAmt;
+    }
+
+    public void setReviewAmt(BigDecimal reviewAmt) {
+        this.reviewAmt = reviewAmt;
+    }
+
+    public BigDecimal getSetAmt() {
+        return setAmt;
+    }
+
+    public void setSetAmt(BigDecimal setAmt) {
+        this.setAmt = setAmt;
+    }
+
+    public String getContentId() {
+        return contentId;
+    }
+
+    public void setContentId(String contentId) {
+        this.contentId = contentId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getTypeName() {
+        return typeName;
+    }
+
+    public void setTypeName(String typeName) {
+        this.typeName = typeName;
+    }
+}

+ 22 - 0
src/main/java/com/jeeplus/modules/workcontent/dao/WorkContentVisamanageDao.java

@@ -0,0 +1,22 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.workcontent.dao;
+
+import com.jeeplus.common.persistence.CrudDao;
+import com.jeeplus.common.persistence.annotation.MyBatisDao;
+import com.jeeplus.modules.workcontent.entity.WorkContentAltermanage;
+import com.jeeplus.modules.workcontent.entity.WorkContentVisamanage;
+
+import java.util.List;
+
+/**
+ * 变更管理DAO接口
+ * @author ssrh
+ * @version 2018-06-06
+ */
+@MyBatisDao
+public interface WorkContentVisamanageDao extends CrudDao<WorkContentVisamanage> {
+
+    List<WorkContentVisamanage> findByConId(String conId);
+}

+ 175 - 0
src/main/java/com/jeeplus/modules/workcontent/entity/WorkContentVisamanage.java

@@ -0,0 +1,175 @@
+package com.jeeplus.modules.workcontent.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.common.persistence.DataEntity;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
+import org.springframework.format.annotation.NumberFormat;
+
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+
+public class WorkContentVisamanage  extends DataEntity<WorkContentVisamanage> {
+    private static final long serialVersionUID = 1L;
+    private String projectId;		// 项目id
+    private String contentId;		// 工作内容ID
+    private ProjectContentData contract;		// 合同ID
+    private String visaType;		// 变更类型
+    private Date visaDate;		// 变更日期
+    private String visaCtnt;		// 变更主要内容
+    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+    private Double reviewAmt;		// 送审金额
+    @NumberFormat(style = NumberFormat.Style.CURRENCY)
+    private Double setAmt;		// 审定金额
+    private Date subDate;		// 报送日期
+    private Date setDate;		// 审定日期
+    private String inAccount;		// 计入台账
+    private String inPayment;		// 计入支付
+    private String proConTentName;
+    private String typeName;
+    private String createName;
+
+    public String getCreateName() {
+        return createName;
+    }
+
+    public void setCreateName(String createName) {
+        this.createName = createName;
+    }
+
+    public String getProConTentName() {
+        return proConTentName;
+    }
+
+    public void setProConTentName(String proConTentName) {
+        this.proConTentName = proConTentName;
+    }
+
+    public String getTypeName() {
+        return typeName;
+    }
+
+    public void setTypeName(String typeName) {
+        this.typeName = typeName;
+    }
+
+    public WorkContentVisamanage() {
+        super();
+    }
+
+    public WorkContentVisamanage(String id){
+        super(id);
+    }
+
+    @ExcelField(title="项目id", align=2, sort=7)
+    public String getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(String projectId) {
+        this.projectId = projectId;
+    }
+
+    @ExcelField(title="工作内容ID", align=2, sort=8)
+    public String getContentId() {
+        return contentId;
+    }
+
+    public void setContentId(String contentId) {
+        this.contentId = contentId;
+    }
+
+    public ProjectContentData getContract() {
+        return contract;
+    }
+
+    public void setContract(ProjectContentData contract) {
+        this.contract = contract;
+    }
+    @ExcelField(title="变更类型", dictType="", align=2, sort=10)
+    public String getVisaType() {
+        return visaType;
+    }
+
+    public void setVisaType(String visaType) {
+        this.visaType = visaType;
+    }
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @NotNull(message="变更日期不能为空")
+    @ExcelField(title="变更日期", align=2, sort=11)
+    public Date getVisaDate() {
+        return visaDate;
+    }
+
+    public void setVisaDate(Date visaDate) {
+        this.visaDate = visaDate;
+    }
+
+    @ExcelField(title="变更主要内容", align=2, sort=13)
+    public String getVisaCtnt() {
+        return visaCtnt;
+    }
+
+    public void setVisaCtnt(String visaCtnt) {
+        this.visaCtnt = visaCtnt;
+    }
+
+    @ExcelField(title="送审金额", align=2, sort=14)
+    public Double getReviewAmt() {
+        return reviewAmt;
+    }
+
+    public void setReviewAmt(Double reviewAmt) {
+        this.reviewAmt = reviewAmt;
+    }
+
+    @ExcelField(title="审定金额", align=2, sort=15)
+    public Double getSetAmt() {
+        return setAmt;
+    }
+
+    public void setSetAmt(Double setAmt) {
+        this.setAmt = setAmt;
+    }
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @NotNull(message="报送日期不能为空")
+    @ExcelField(title="报送日期", align=2, sort=16)
+    public Date getSubDate() {
+        return subDate;
+    }
+
+    public void setSubDate(Date subDate) {
+        this.subDate = subDate;
+    }
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @NotNull(message="审定日期不能为空")
+    @ExcelField(title="审定日期", align=2, sort=17)
+    public Date getSetDate() {
+        return setDate;
+    }
+
+    public void setSetDate(Date setDate) {
+        this.setDate = setDate;
+    }
+
+    @ExcelField(title="计入台账", dictType="", align=2, sort=18)
+    public String getInAccount() {
+        return inAccount;
+    }
+
+    public void setInAccount(String inAccount) {
+        this.inAccount = inAccount;
+    }
+
+    @ExcelField(title="计入支付", dictType="", align=2, sort=19)
+    public String getInPayment() {
+        return inPayment;
+    }
+
+    public void setInPayment(String inPayment) {
+        this.inPayment = inPayment;
+    }
+}

+ 63 - 0
src/main/java/com/jeeplus/modules/workcontent/service/WorkContentVisamanageService.java

@@ -0,0 +1,63 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.workcontent.service;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.service.CrudService;
+import com.jeeplus.modules.projectcontentinfo.entity.ProjectContentData;
+import com.jeeplus.modules.workcontent.dao.WorkContentVisamanageDao;
+import com.jeeplus.modules.workcontent.entity.WorkContentVisamanage;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+ * 变更管理Service
+ * @author ssrh
+ * @version 2018-06-06
+ */
+@Service
+@Transactional(readOnly = true)
+public class WorkContentVisamanageService extends CrudService<WorkContentVisamanageDao, WorkContentVisamanage> implements WorkContentDetailBaseService{
+
+	public WorkContentVisamanage get(String id) {
+		return super.get(id);
+	}
+	
+	public List<WorkContentVisamanage> findList(WorkContentVisamanage workContentVisamanage) {
+		return super.findList(workContentVisamanage);
+	}
+	
+	public Page<WorkContentVisamanage> findPage(Page<WorkContentVisamanage> page, WorkContentVisamanage workContentVisamanage) {
+		return super.findPage(page, workContentVisamanage);
+	}
+	
+	@Transactional(readOnly = false)
+	public void save(WorkContentVisamanage workContentVisamanage) {
+		super.save(workContentVisamanage);
+	}
+	
+	@Transactional(readOnly = false)
+	public void delete(WorkContentVisamanage workContentVisamanage) {
+		super.delete(workContentVisamanage);
+	}
+
+
+    @Override
+    @Transactional(readOnly = false)
+    public void saveDetails(String detailStr, String projectId, String contentId) {
+        JSONObject jsonObject = JSON.parseObject(detailStr);
+        ProjectContentData contentData = new ProjectContentData();
+        contentData.setId(jsonObject.getString("contract.id"));
+		WorkContentVisamanage newRecord = jsonObject.toJavaObject(WorkContentVisamanage.class);
+        newRecord.setContract(contentData);
+        newRecord.setProjectId(projectId);
+        newRecord.setContentId(contentId);
+        this.save(newRecord);
+    }
+
+}

+ 208 - 0
src/main/java/com/jeeplus/modules/workcontent/web/WorkContentVisamanageController.java

@@ -0,0 +1,208 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.workcontent.web;
+
+import com.google.common.collect.Lists;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.workcontent.entity.WorkContentVisamanage;
+import com.jeeplus.modules.workcontent.service.WorkContentVisamanageService;
+import org.apache.shiro.authz.annotation.Logical;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.ConstraintViolationException;
+import java.util.List;
+
+/**
+ * 变更管理Controller
+ * @author ssrh
+ * @version 2018-06-06
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/workcontent/workContentVisamanage")
+public class WorkContentVisamanageController extends BaseController {
+
+	@Autowired
+	private WorkContentVisamanageService workContentVisamanageService;
+
+	@ModelAttribute
+	public WorkContentVisamanage get(@RequestParam(required=false) String id) {
+		WorkContentVisamanage entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = workContentVisamanageService.get(id);
+		}
+		if (entity == null){
+			entity = new WorkContentVisamanage();
+		}
+		return entity;
+	}
+
+	/**
+	 * 变更管理列表页面
+	 */
+	@RequiresPermissions("workcontent:workContentVisamanage:list")
+	@RequestMapping(value = {"list", ""})
+	public String list(WorkContentVisamanage workContentVisamanage, HttpServletRequest request, HttpServletResponse response, Model model) {
+		Page<WorkContentVisamanage> page = workContentVisamanageService.findPage(new Page<WorkContentVisamanage>(request, response), workContentVisamanage);
+		model.addAttribute("page", page);
+		return "modules/workcontent/workContentVisamanageList";
+	}
+
+	/**
+	 * 查看,增加,编辑变更管理表单页面
+	 */
+	@RequestMapping(value = "form")
+	public String form(WorkContentVisamanage workContentVisamanage, String view, Model model) {
+		WorkContentVisamanage oldRecord = null;
+        if(StringUtils.isNotBlank(workContentVisamanage.getContentId())){
+            List<WorkContentVisamanage> list = workContentVisamanageService.findList(workContentVisamanage);
+            if(list!=null&&!list.isEmpty()){
+                oldRecord = list.get(0);
+            }
+        }
+        if(oldRecord!=null){
+            model.addAttribute("workContentVisamanage", oldRecord);
+        }else {
+            model.addAttribute("workContentVisamanage", workContentVisamanage);
+        }
+        String viewPath = "modules/workcontent/workContentVisamanage";
+        if("view".equals(view)){
+            viewPath+="View";
+        }
+		return viewPath;
+	}
+
+	/**
+	 * 保存变更管理
+	 */
+	@RequiresPermissions(value={"workcontent:workContentVisamanage:add","workcontent:workContentVisamanage:edit"},logical=Logical.OR)
+	@RequestMapping(value = "save")
+	public String save(WorkContentVisamanage workContentVisamanage, Model model, RedirectAttributes redirectAttributes) throws Exception{
+		if (!beanValidator(model, workContentVisamanage)){
+			return form(workContentVisamanage,null, model);
+		}
+		if(!workContentVisamanage.getIsNewRecord()){//编辑表单保存
+			WorkContentVisamanage t = workContentVisamanageService.get(workContentVisamanage.getId());//从数据库取出记录的值
+			MyBeanUtils.copyBeanNotNull2Bean(workContentVisamanage, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+			workContentVisamanageService.save(t);//保存
+		}else{//新增表单保存
+			workContentVisamanageService.save(workContentVisamanage);//保存
+		}
+		addMessage(redirectAttributes, "保存变更管理成功");
+		return "redirect:"+Global.getAdminPath()+"/workcontent/workContentVisamanage/?repage";
+	}
+
+	/**
+	 * 删除变更管理
+	 */
+	@RequiresPermissions("workcontent:workContentVisamanage:del")
+	@RequestMapping(value = "delete")
+	public String delete(WorkContentVisamanage workContentVisamanage, RedirectAttributes redirectAttributes) {
+		workContentVisamanageService.delete(workContentVisamanage);
+		addMessage(redirectAttributes, "删除变更管理成功");
+		return "redirect:"+Global.getAdminPath()+"/workcontent/workContentVisamanage/?repage";
+	}
+
+	/**
+	 * 批量删除变更管理
+	 */
+	@RequiresPermissions("workcontent:workContentVisamanage:del")
+	@RequestMapping(value = "deleteAll")
+	public String deleteAll(String ids, RedirectAttributes redirectAttributes) {
+		String idArray[] =ids.split(",");
+		for(String id : idArray){
+			workContentVisamanageService.delete(workContentVisamanageService.get(id));
+		}
+		addMessage(redirectAttributes, "删除变更管理成功");
+		return "redirect:"+Global.getAdminPath()+"/workcontent/workContentVisamanage/?repage";
+	}
+
+	/**
+	 * 导出excel文件
+	 */
+	@RequiresPermissions("workcontent:workContentVisamanage:export")
+    @RequestMapping(value = "export", method=RequestMethod.POST)
+    public String exportFile(WorkContentVisamanage workContentVisamanage, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+		try {
+            String fileName = "变更管理"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+            Page<WorkContentVisamanage> page = workContentVisamanageService.findPage(new Page<WorkContentVisamanage>(request, response, -1), workContentVisamanage);
+    		new ExportExcel("变更管理", WorkContentVisamanage.class).setDataList(page.getList()).write(response, fileName).dispose();
+    		return null;
+		} catch (Exception e) {
+			addMessage(redirectAttributes, "导出变更管理记录失败!失败信息:"+e.getMessage());
+		}
+		return "redirect:"+Global.getAdminPath()+"/workcontent/workContentVisamanage/?repage";
+    }
+
+	/**
+	 * 导入Excel数据
+
+	 */
+	@RequiresPermissions("workcontent:workContentVisamanage:import")
+    @RequestMapping(value = "import", method=RequestMethod.POST)
+    public String importFile(MultipartFile file, RedirectAttributes redirectAttributes) {
+		try {
+			int successNum = 0;
+			int failureNum = 0;
+			StringBuilder failureMsg = new StringBuilder();
+			ImportExcel ei = new ImportExcel(file, 1, 0);
+			List<WorkContentVisamanage> list = ei.getDataList(WorkContentVisamanage.class);
+			for (WorkContentVisamanage workContentVisamanage : list){
+				try{
+					workContentVisamanageService.save(workContentVisamanage);
+					successNum++;
+				}catch(ConstraintViolationException ex){
+					failureNum++;
+				}catch (Exception ex) {
+					failureNum++;
+				}
+			}
+			if (failureNum>0){
+				failureMsg.insert(0, ",失败 "+failureNum+" 条变更管理记录。");
+			}
+			addMessage(redirectAttributes, "已成功导入 "+successNum+" 条变更管理记录"+failureMsg);
+		} catch (Exception e) {
+			addMessage(redirectAttributes, "导入变更管理失败!失败信息:"+e.getMessage());
+		}
+		return "redirect:"+Global.getAdminPath()+"/workcontent/workContentVisamanage/?repage";
+    }
+
+	/**
+	 * 下载导入变更管理数据模板
+	 */
+	@RequiresPermissions("workcontent:workContentVisamanage:import")
+    @RequestMapping(value = "import/template")
+    public String importFileTemplate(HttpServletResponse response, RedirectAttributes redirectAttributes) {
+		try {
+            String fileName = "变更管理数据导入模板.xlsx";
+    		List<WorkContentVisamanage> list = Lists.newArrayList();
+    		new ExportExcel("变更管理数据", WorkContentVisamanage.class, 1).setDataList(list).write(response, fileName).dispose();
+    		return null;
+		} catch (Exception e) {
+			addMessage(redirectAttributes, "导入模板下载失败!失败信息:"+e.getMessage());
+		}
+		return "redirect:"+Global.getAdminPath()+"/workcontent/workContentVisamanage/?repage";
+    }
+	
+	
+	
+
+}

+ 185 - 0
src/main/resources/mappings/modules/workcontent/WorkContentVisamanageDao.xml

@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.jeeplus.modules.workcontent.dao.WorkContentVisamanageDao">
+    
+	<sql id="workContentVisamanageColumns">
+		a.id AS "id",
+		a.create_by AS "createBy.id",
+		a.create_date AS "createDate",
+		a.update_by AS "updateBy.id",
+		a.update_date AS "updateDate",
+		a.remarks AS "remarks",
+		a.del_flag AS "delFlag",
+		a.project_id AS "projectId",
+		a.content_id AS "contentId",
+		a.cont_id AS "contract.id",
+		a.visa_type AS "visaType",
+		a.visa_date AS "visaDate",
+		a.visa_ctnt AS "visaCtnt",
+		a.review_amt AS "reviewAmt",
+		a.set_amt AS "setAmt",
+		a.sub_date AS "subDate",
+		a.set_date AS "setDate",
+		a.in_account AS "inAccount",
+		a.in_payment AS "inPayment",
+		cd.name AS "contract.name"
+	</sql>
+	
+	<sql id="workContentVisamanageJoins">
+		LEFT JOIN  project_content_data cd ON cd.id = a.cont_id
+	</sql>
+	
+    
+	<select id="get" resultType="WorkContentVisamanage" >
+		SELECT 
+			<include refid="workContentVisamanageColumns"/>
+		FROM work_content_visamanage a
+		<include refid="workContentVisamanageJoins"/>
+		WHERE a.id = #{id}
+	</select>
+	
+	<select id="findList" resultType="WorkContentVisamanage" >
+		SELECT 
+			<include refid="workContentVisamanageColumns"/>
+		FROM work_content_visamanage a
+		<include refid="workContentVisamanageJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+			<if test="projectId != null and projectId != ''">
+				AND a.project_id = #{projectId}
+			</if>
+			<if test="contentId != null and contentId != ''">
+				AND a.content_id = #{contentId}
+			</if>
+			<if test="contract != null and contract.id != null and contract.id !=''">
+				AND a.cont_id = #{contract.id}
+			</if>
+		</where>
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<select id="findByConId" parameterType="String" resultType="WorkContentVisamanage">
+       SELECT
+		<include refid="workContentVisamanageColumns"/>
+		,pcd.name as 'proConTentName',wct.type_name as 'typeName',su.name as 'createName'
+		FROM work_content_visamanage a
+		<include refid="workContentVisamanageJoins"/>
+		left join project_content_data pcd on pcd.id =a.content_id
+		left join project_content_info pci on pci.info_id = a.content_id
+		left join work_content_type wct on wct.type_id = pci.dict_type
+        left join sys_user su on su.id = a.create_by
+		<where>
+			a.cont_id = #{conId} and pcd.del_flag=0
+		</where>
+	</select>
+	
+	<select id="findAllList" resultType="WorkContentVisamanage" >
+		SELECT 
+			<include refid="workContentVisamanageColumns"/>
+		FROM work_content_visamanage a
+		<include refid="workContentVisamanageJoins"/>
+		<where>
+			a.del_flag = #{DEL_FLAG_NORMAL}
+		</where>		
+		<choose>
+			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
+				ORDER BY ${page.orderBy}
+			</when>
+			<otherwise>
+				ORDER BY a.update_date DESC
+			</otherwise>
+		</choose>
+	</select>
+	
+	<insert id="insert">
+		INSERT INTO work_content_visamanage(
+			id,
+			create_by,
+			create_date,
+			update_by,
+			update_date,
+			remarks,
+			del_flag,
+			project_id,
+			content_id,
+			cont_id,
+			visa_type,
+			visa_date,
+			visa_ctnt,
+			review_amt,
+			set_amt,
+			sub_date,
+			set_date,
+			in_account,
+			in_payment
+		) VALUES (
+			#{id},
+			#{createBy.id},
+			#{createDate},
+			#{updateBy.id},
+			#{updateDate},
+			#{remarks},
+			#{delFlag},
+			#{projectId},
+			#{contentId},
+			#{contract.id},
+			#{visaType},
+			#{visaDate},
+			#{visaCtnt},
+			#{reviewAmt},
+			#{setAmt},
+			#{subDate},
+			#{setDate},
+			#{inAccount},
+			#{inPayment}
+		)
+	</insert>
+	
+	<update id="update">
+		UPDATE work_content_visamanage SET 	
+			update_by = #{updateBy.id},
+			update_date = #{updateDate},
+			remarks = #{remarks},
+			project_id = #{projectId},
+			content_id = #{contentId},
+			cont_id = #{contract.id},
+			visa_type = #{visaType},
+			visa_date = #{visaDate},
+			visa_ctnt = #{visaCtnt},
+			review_amt = #{reviewAmt},
+			set_amt = #{setAmt},
+			sub_date = #{subDate},
+			set_date = #{setDate},
+			in_account = #{inAccount},
+			in_payment = #{inPayment}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!--物理删除-->
+	<update id="delete">
+		DELETE FROM work_content_visamanage
+		WHERE id = #{id}
+	</update>
+	
+	<!--逻辑删除-->
+	<update id="deleteByLogic">
+		UPDATE work_content_visamanage SET 
+			del_flag = #{DEL_FLAG_DELETE}
+		WHERE id = #{id}
+	</update>
+	
+	
+	<!-- 根据实体名称和字段名称和字段值获取唯一记录 -->
+	<select id="findUniqueByProperty" resultType="WorkContentVisamanage" statementType="STATEMENT">
+		select * FROM work_content_visamanage  where ${propertyName} = '${value}'
+	</select>
+	
+</mapper>

+ 125 - 0
src/main/webapp/webpage/modules/workcontent/workContentVisamanage.jsp

@@ -0,0 +1,125 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+
+		<form:form id="subForm" modelAttribute="workContentVisamanage" action="#" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+            <div class="form-group layui-row lw12">
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>合同名称:</label>
+                <div class="layui-input-block with-icon">
+                    <sys:gridselectProjcontent url="${ctx}/projectcontentinfo/projectContentData/selectcontent" id="contId" name="contract.id"  value="${workContentVisamanage.contract.id}"  title="选择合同" labelName="contract.name"
+                                               labelValue="${workContentVisamanage.contract.name}" cssClass="form-control layui-input required" projectId="${workContentVisamanage.projectId}" type="41" fieldLabels="" fieldKeys="" searchLabel="${fns:urlEncode('合同名称')}" searchKey="" ></sys:gridselectProjcontent>
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>签证类型:</label>
+                <div class="layui-input-block">
+                    <form:select path="visaType" class="form-control layui-input required">
+                        <form:option value="" label=""/>
+                        <form:options items="${fns:getMainDictList('content_visa_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                    </form:select>
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>签证日期:</label>
+                <div class="layui-input-block">
+                    <input class="laydate-icondate form-control layui-input layer-date laydate-icon required" id="visaDate" name="visaDate" value="<fmt:formatDate value="${workContentVisamanage.visaDate}" pattern="yyyy-MM-dd"/>">
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm12 with-textarea">
+                <label class="layui-form-label">签证主要内容:</label>
+                <div class="layui-input-block">
+                    <form:textarea path="visaCtnt" htmlEscape="false" rows="3"    class="form-control layui-area"/>
+                </div>
+            </div>
+        </div>
+
+        <div class="form-group layui-row lw12">
+            <div class="form-group-label"><h2>详情信息</h2></div>
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>送审金额:</label>
+                <div class="layui-input-block">
+                    <input name="reviewAmt" htmlEscape="false"  value="<fmt:formatNumber value="${workContentVisamanage.reviewAmt}" pattern="#,##0.00#"/>" onchange="formatNum(this);" class="form-control layui-input required number"/>
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>审定金额:</label>
+                <div class="layui-input-block">
+                    <input name="setAmt" htmlEscape="false"  value="<fmt:formatNumber value="${workContentVisamanage.setAmt}" pattern="#,##0.00#"/>" onchange="formatNum(this);" class="form-control layui-input required number"/>
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>报送日期:</label>
+                <div class="layui-input-block">
+                    <input id="subDate" name="subDate" type="text" maxlength="20" class="laydate-icondate form-control layui-input layer-date laydate-icon required"
+                           value="<fmt:formatDate value="${workContentVisamanage.subDate}" pattern="yyyy-MM-dd"/>"/>
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>审定日期:</label>
+                <div class="layui-input-block">
+                    <input id="setDate" name="setDate" type="text" maxlength="20" class="laydate-icondate form-control layui-input layer-date laydate-icon required"
+                           value="<fmt:formatDate value="${workContentVisamanage.setDate}" pattern="yyyy-MM-dd"/>"/>
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>计入台账:</label>
+                <div class="layui-input-block">
+                    <form:select path="inAccount" class="form-control layui-input required">
+                        <form:option value="" label=""/>
+                        <form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                    </form:select>
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>计入支付:</label>
+                <div class="layui-input-block">
+                    <form:select path="inPayment" class="form-control layui-input required">
+                        <form:option value="" label=""/>
+                        <form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                    </form:select>
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm12 with-textarea">
+                <label class="layui-form-label">备注信息:</label>
+                <div class="layui-input-block">
+                    <form:textarea path="remarks" htmlEscape="false" rows="3"    class="form-control layui-area"/>
+                </div>
+            </div>
+        </div>
+	</form:form>
+<script type="text/javascript">
+    var validateForm;
+    $(document).ready(function() {
+        validateForm = $("#subForm").validate({
+            errorContainer: "#messageBox",
+            errorPlacement: function(error, element) {
+                $("#messageBox").text("输入有误,请先更正。");
+                if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                    error.appendTo(element.parent().parent());
+                } else {
+                    error.insertAfter(element);
+                }
+            }
+        });
+
+        laydate.render({
+            elem: '#visaDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+        });
+        laydate.render({
+            elem: '#subDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+        });
+        laydate.render({
+            elem: '#setDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+        });
+
+    });
+
+    function genDetailStr(){
+        var stringify = JSON.stringify($("#subForm").serializeJson());
+        return stringify;
+    }
+</script>

+ 125 - 0
src/main/webapp/webpage/modules/workcontent/workContentVisamanageView.jsp

@@ -0,0 +1,125 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+
+		<form:form id="subForm" modelAttribute="workContentVisamanage" action="#" method="post" class="form-horizontal">
+		<form:hidden path="id"/>
+            <div class="form-group layui-row lw12">
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>合同名称:</label>
+                <div class="layui-input-block with-icon">
+                    <sys:gridselectProjcontent url="${ctx}/projectcontentinfo/projectContentData/selectcontent" id="contId" name="contract.id"  value="${workContentVisamanage.contract.id}"  title="选择合同" labelName="contract.name"
+                                               labelValue="${workContentVisamanage.contract.name}" cssClass="form-control layui-input required" projectId="${workContentVisamanage.projectId}" type="41" fieldLabels="" fieldKeys="" searchLabel="${fns:urlEncode('合同名称')}" searchKey="" ></sys:gridselectProjcontent>
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>签证类型:</label>
+                <div class="layui-input-block">
+                    <form:select path="visaType" class="form-control layui-input required">
+                        <form:option value="" label=""/>
+                        <form:options items="${fns:getMainDictList('content_visa_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                    </form:select>
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>签证日期:</label>
+                <div class="layui-input-block">
+                    <input class="laydate-icondate form-control layui-input layer-date laydate-icon required" id="visaDate" name="visaDate" value="<fmt:formatDate value="${workContentVisamanage.visaDate}" pattern="yyyy-MM-dd"/>">
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm12 with-textarea">
+                <label class="layui-form-label">签证主要内容:</label>
+                <div class="layui-input-block">
+                    <form:textarea path="visaCtnt" htmlEscape="false" rows="3"    class="form-control layui-area"/>
+                </div>
+            </div>
+        </div>
+
+        <div class="form-group layui-row lw12">
+            <div class="form-group-label"><h2>详情信息</h2></div>
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>送审金额:</label>
+                <div class="layui-input-block">
+                    <input name="reviewAmt" htmlEscape="false"  value="<fmt:formatNumber value="${workContentVisamanage.reviewAmt}" pattern="#,##0.00#"/>" onchange="formatNum(this);" class="form-control layui-input required number"/>
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>审定金额:</label>
+                <div class="layui-input-block">
+                    <input name="setAmt" htmlEscape="false"  value="<fmt:formatNumber value="${workContentVisamanage.setAmt}" pattern="#,##0.00#"/>" onchange="formatNum(this);" class="form-control layui-input required number"/>
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>报送日期:</label>
+                <div class="layui-input-block">
+                    <input id="subDate" name="subDate" type="text" maxlength="20" class="laydate-icondate form-control layui-input layer-date laydate-icon required"
+                           value="<fmt:formatDate value="${workContentVisamanage.subDate}" pattern="yyyy-MM-dd"/>"/>
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>审定日期:</label>
+                <div class="layui-input-block">
+                    <input id="setDate" name="setDate" type="text" maxlength="20" class="laydate-icondate form-control layui-input layer-date laydate-icon required"
+                           value="<fmt:formatDate value="${workContentVisamanage.setDate}" pattern="yyyy-MM-dd"/>"/>
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>计入台账:</label>
+                <div class="layui-input-block">
+                    <form:select path="inAccount" class="form-control layui-input required">
+                        <form:option value="" label=""/>
+                        <form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                    </form:select>
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm6">
+                <label class="layui-form-label"><span class="require-item">*</span>计入支付:</label>
+                <div class="layui-input-block">
+                    <form:select path="inPayment" class="form-control layui-input required">
+                        <form:option value="" label=""/>
+                        <form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                    </form:select>
+                </div>
+            </div>
+            <div class="layui-item layui-col-sm12 with-textarea">
+                <label class="layui-form-label">备注信息:</label>
+                <div class="layui-input-block">
+                    <form:textarea path="remarks" htmlEscape="false" rows="3"    class="form-control layui-area"/>
+                </div>
+            </div>
+        </div>
+	</form:form>
+<script type="text/javascript">
+    var validateForm;
+    $(document).ready(function() {
+        validateForm = $("#subForm").validate({
+            errorContainer: "#messageBox",
+            errorPlacement: function(error, element) {
+                $("#messageBox").text("输入有误,请先更正。");
+                if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
+                    error.appendTo(element.parent().parent());
+                } else {
+                    error.insertAfter(element);
+                }
+            }
+        });
+
+        laydate.render({
+            elem: '#visaDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+        });
+        laydate.render({
+            elem: '#subDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+        });
+        laydate.render({
+            elem: '#setDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+        });
+
+    });
+
+    function genDetailStr(){
+        var stringify = JSON.stringify($("#subForm").serializeJson());
+        return stringify;
+    }
+</script>