Browse Source

新增情况,字段添加

[user3] 4 years ago
parent
commit
dadd1c3389

+ 1 - 1
src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/DonorMaterialMapper.java

@@ -105,7 +105,7 @@ public interface DonorMaterialMapper extends BaseMapper<DonorMaterial> {
      * 更新项目的erp数量
      * @param material 物料信息
      * */
-    void insertErpOne(@Param("material")ErpCreditMaterial material,@Param("projectId")String projectId);
+    void insertErpOne(@Param("material")ErpCreditMaterial material,@Param("projectId")String projectId,@Param("projectName")String projectName);
 
     /**
      * 更新项目所有的erp数量默认为0

+ 2 - 0
src/main/java/com/jeeplus/modules/sg/financial/settlement/mapper/xml/DonorMaterialMapper.xml

@@ -280,6 +280,7 @@
 			remarks,
 			del_flag,
 			project_id,
+		   project_name,
 			materail_describe,
 			unit,
 			examined_num,
@@ -294,6 +295,7 @@
 			#{material.remarks},
 			#{material.delFlag},
 			#{projectId},
+		 #{projectName},
 			#{material.eqmMaterialDetails2},
 			#{material.mtlUnit},
 			'0',

+ 2 - 2
src/main/java/com/jeeplus/modules/sg/financial/settlement/service/DonorMaterialService.java

@@ -278,7 +278,7 @@ public class DonorMaterialService extends CrudService<DonorMaterialMapper, Donor
      * */
     /**/
     @Transactional(readOnly = false)
-    public int verifyProjectMaterial(List<ErpCreditMaterial> list, String projectId) {
+    public int verifyProjectMaterial(List<ErpCreditMaterial> list, String projectId,String projectName) {
         //返回值
         // 0:无甲供材数据
         //1:领料完成
@@ -297,7 +297,7 @@ public class DonorMaterialService extends CrudService<DonorMaterialMapper, Donor
                 if (donor <= 0) {
                     //插入
                     material.preInsert();
-                    donorMaterialMapper.insertErpOne(material,projectId);
+                    donorMaterialMapper.insertErpOne(material,projectId,projectName);
                 } else {
                     //更新
                     donorMaterialMapper.updateErpOne(material, projectId);

+ 8 - 6
src/main/java/com/jeeplus/modules/sg/financial/settlement/web/ProjectBudgetController.java

@@ -546,6 +546,7 @@ public class ProjectBudgetController extends BaseController {
                         erpCredits) {
                     //项目定义号
                     String itemId = e.getItemId();
+                    String itemName = e.getItemName();
                     //将两个项目对应的
                     List<ErpCreditMaterial> erpCreditChild2s = e.getErpCreditChild2s();
                     List<ErpCreditEquipment> erpCreditChild1s = e.getErpCreditChild1s();
@@ -569,7 +570,7 @@ public class ProjectBudgetController extends BaseController {
                     //默认将该项目的物料erp数量都更新为0
                     donorMaterialService.updateErpZero(itemId);
                     if (erpCreditChild2s.size() > 0) {
-                        int i = donorMaterialService.verifyProjectMaterial(erpCreditChild2s, itemId);
+                        int i = donorMaterialService.verifyProjectMaterial(erpCreditChild2s, itemId, itemName);
                         //将有问题的信息记录下来
                         if (i == 0) {
                             nullMsg.append("项目编号" + itemId + "无甲供材数据;");
@@ -599,7 +600,7 @@ public class ProjectBudgetController extends BaseController {
                 //判断是否存在缺失应付金额或者甲供材审定信息的项目
 
                 //费用检查检查未通过
-                if (notPass.size() > 0) {
+                /*if (notPass.size() > 0) {
                     for (String a :
                             notPass) {
                         for (ErpCredit e :
@@ -610,7 +611,7 @@ public class ProjectBudgetController extends BaseController {
                         }
                         notMsg.append("项目编号" + a + "费用入账有误;");
                     }
-                }
+                }*/
                 if (notExit.size() > 0) {
                     if (notExit.size() > 0) {
                         for (String a :
@@ -652,6 +653,7 @@ public class ProjectBudgetController extends BaseController {
                         erpCredits) {
                     //项目定义号
                     String itemId = e.getItemId();
+                    String itemName = e.getItemName();
                     //将两个项目对应的
                     List<ErpCreditMaterial> erpCreditChild2s = e.getErpCreditChild2s();
                     List<ErpCreditEquipment> erpCreditChild1s = e.getErpCreditChild1s();
@@ -674,7 +676,7 @@ public class ProjectBudgetController extends BaseController {
                     2:领料未完成*/
                     donorMaterialService.updateErpZero(itemId);
                     if (erpCreditChild2s.size() > 0) {
-                        int i = donorMaterialService.verifyProjectMaterial(erpCreditChild2s, itemId);
+                        int i = donorMaterialService.verifyProjectMaterial(erpCreditChild2s, itemId,itemName);
                         //将有问题的信息记录下来
                         if (i == 0) {
                             costNotMsg.append("成本项目编号" + itemId + "(无甲供材数据;");
@@ -705,7 +707,7 @@ public class ProjectBudgetController extends BaseController {
                             costNullMsg.append("项目编号" + a + "缺少应付金额;");
                         }
                     }
-                    for (String a :
+                    /*for (String a :
                             notPass) {
                         for (ErpCredit e :
                                 erpCredits) {
@@ -714,7 +716,7 @@ public class ProjectBudgetController extends BaseController {
                             }
                         }
                         costNotMsg.append("项目编号" + a + "费用入账有误;");
-                    }
+                    }*/
                 }
                 if (null != costNullMsg && !"".equals(costNullMsg)) {
                     returnMsg.append(costNullMsg);