2 次代码提交 2872167caf ... 9a65539210

作者 SHA1 备注 提交日期
  user7 9a65539210 Merge remote-tracking branch 'origin/master' 4 年之前
  user7 0966c34c8c 签证汇总表 4 年之前

+ 14 - 0
src/main/java/com/jeeplus/modules/projectVisa/service/ProjectVisaService.java

@@ -75,6 +75,20 @@ public class ProjectVisaService extends CrudService<ProjectVisaDao,ProjectVisa>
         }
     }
 
+    /**
+     * 删除签证-变更(软删除)
+
+     */
+    @Transactional(readOnly = false)
+    public void deleteByLogic(String id,String type) {
+
+        ProjectVisa projectVisa=new ProjectVisa();
+        projectVisa.setType(type);
+        projectVisa.setId(id);
+        projectVisaDao.deleteByLogic(projectVisa);
+
+    }
+
 
 
     /*

+ 21 - 1
src/main/java/com/jeeplus/modules/projectVisa/web/ProjectVisaController.java

@@ -151,7 +151,7 @@ public class ProjectVisaController extends BaseController {
      */
     @RequestMapping(value = "save")
     public String save(ProjectVisa projectVisa,RedirectAttributes redirectAttributes) throws Exception{
-        projectVisa.setType("1");
+
         projectVisaService.save(projectVisa);
 
         addMessage(redirectAttributes, "保存客户管理成功");
@@ -213,4 +213,24 @@ public class ProjectVisaController extends BaseController {
         return map;
     }
 
+    /**
+     * 删除依据性资料
+     */
+    @RequestMapping(value = "delete")
+    @ResponseBody
+    public Map<String,Object> delete(ProjectVisa projectVisa, RedirectAttributes redirectAttributes) {
+        Map<String,Object> j= new HashMap<>();
+        try {
+            projectVisaService.deleteByLogic(projectVisa.getId(),projectVisa.getType());
+            j.put("status",true);
+            j.put("msg","删除成功");
+            addMessage(redirectAttributes, "删除成功");
+        }catch (Exception e){
+            j.put("status",false);
+            j.put("msg","删除失败");
+            addMessage(redirectAttributes, "删除失败");
+        }
+        return j;
+    }
+
 }

+ 7 - 2
src/main/resources/mappings/modules/projectrecord/stage/ProjectVisaDao.xml

@@ -255,7 +255,7 @@
 		from contract_visa_design a
 		where
 		a.contract_id=#{id}
-		and a.type=1
+		and a.type=1 and del_flag='0'
 	</select>
 	<!--根据id查询获取表格对象-->
 	<select id="getVisa" resultType="ProjectVisa">
@@ -277,6 +277,11 @@
 		from contract_visa_design a
 		where
 		a.id=#{id}
-		and a.type=1
+		and a.type=1 and del_flag='0'
 	</select>
+
+	<!--软删除签证-变更汇总表-->
+	<update id="deleteByLogic">
+		update contract_visa_design set del_flag='1' where id=#{id} and type=#{type}
+	</update>
 </mapper>

+ 1 - 1
src/main/webapp/webpage/modules/projectrecord/implementStage/projectVisaForm.jsp

@@ -359,7 +359,7 @@
         <form:form id="inputForm" modelAttribute="projectVisa" action="${ctx}/project/projectVisa/save?" method="post" class="form-horizontal">
             <form:hidden path="id"/>
             <form:hidden path="contractId" value="${projectVisa.contractId}"/>
-
+            <form:hidden path="type" value="${projectVisa.type}"/>
 
 
             <sys:message content="${message}"/>

+ 4 - 4
src/main/webapp/webpage/modules/projectrecord/implementStage/projectVisaList.jsp

@@ -350,12 +350,12 @@
         function complain(d){//操作中显示的内容
             if(d.pid=="0") {
                 return [
-                    '<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增工作内容\', \'${ctx}/project/projectVisa/form?contractId='+d.contractId+' \',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
+                    '<a href="javascript:void(0)" onclick="openDialogreAudit(\'新增工作内容\', \'${ctx}/project/projectVisa/form?type=1&contractId='+d.contractId+' \',\'95%\',\'95%\')" style=\"color: white;background: darkseagreen\" class="op-btn op-btn-add" ><i class="fa fa-plus"></i> 新增</a>',
                 ].join('');
             } else if (d.pid!="0"){
                 return [
-                    '<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改工作内容\', \'${ctx}/project/projectVisa/updateTable?id='+d.id+'&contractId='+d.contractId+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>',
-                    /*'<a href="${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+d.id+'&id='+d.contentPId+'&type=8&condition=record" onclick="return confirmxRefresh(\'确认要删除该工作内容报告吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',*/
+                    '<a href="javascript:void(0)" onclick="openDialogreAudit(\'修改工作内容\', \'${ctx}/project/projectVisa/updateTable?type=1&id='+d.id+'&contractId='+d.contractId+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 编辑</a>',
+                    '<a href="${ctx}/project/projectVisa/delete?type=1&id='+d.id+'" onclick="return confirmxRefresh(\'确认要删除该签证汇总表吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',
                 ].join('');
 
                 }
@@ -486,7 +486,7 @@
                             parent.layer.msg(data.msg,{icon:2});
                         }
                         //parent.refreshTrees();
-                        location = '${ctx}/project/projectRecords/list';
+                        location = '${ctx}/project/projectVisa/list';
                     }
                 });
             }