Sfoglia il codice sorgente

平衡利库管理-需求物资验证按钮修改

wangqiang 2 anni fa
parent
commit
5a788eee5d

+ 9 - 1
src/main/java/com/jeeplus/modules/sg/balancedlibrary/materialReportDetails/mapper/xml/MaterialReportDetailsMapper.xml

@@ -20,6 +20,8 @@
 		a.unitWeight as "unitWeight",
 		a.totalWeight as "totalWeight",
 		a.supplied as "supplied",
+		a.reportPerson as "reportPerson",
+		a.reportDepartment as "reportDepartment",
 		a.numberOfNiches as "numberOfNiches",
 		a.numberOfApplications as "numberOfApplications",
 		a.localWareBatch as "localWareBatch",
@@ -160,6 +162,8 @@
         unitWeight,
         totalWeight,
         supplied,
+        reportPerson,
+        reportDepartment,
         numberOfNiches,
         numberOfApplications,
         localWareBatch,
@@ -214,6 +218,8 @@
             #{item.unitWeight},
             #{item.totalWeight},
             #{item.supplied},
+            #{item.reportPerson},
+            #{item.reportDepartment},
             #{item.numberOfNiches},
             #{item.numberOfApplications},
             #{item.localWareBatch},
@@ -295,6 +301,8 @@
         r.unitWeight as "unitWeight",
         r.totalWeight as "totalWeight",
         r.supplied as "supplied",
+        r.reportPerson as "reportPerson",
+        r.reportDepartment as "reportDepartment",
         r.numberOfNiches as "numberOfNiches",
         r.numberOfApplications as "numberOfApplications",
         h.comparison_type as "comparisonType",
@@ -329,4 +337,4 @@
         order by r.reportingArea,r.nameOfReserve,r.materialCode,r.extendedCoding
     </select>
 
-</mapper>
+</mapper>

+ 18 - 8
src/main/java/com/jeeplus/modules/sg/balancedlibrary/materialReportDetails/service/MaterialReportDetailsService.java

@@ -4,10 +4,7 @@
 package com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.service;
 
 import com.jeeplus.common.json.AjaxJson;
-import com.jeeplus.common.utils.DateUtils;
 import com.jeeplus.common.utils.StringUtils;
-import com.jeeplus.common.utils.excel.ExportExcel;
-import com.jeeplus.common.utils.excel.fieldtype.AreaType;
 import com.jeeplus.core.persistence.DataEntity;
 import com.jeeplus.core.persistence.Page;
 import com.jeeplus.core.service.CrudService;
@@ -20,17 +17,14 @@ import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.constant.Mat
 import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.entity.LikuDetail;
 import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.entity.MaterialReportDetails;
 import com.jeeplus.modules.sg.balancedlibrary.materialReportDetails.mapper.MaterialReportDetailsMapper;
-import com.jeeplus.modules.sg.balancedlibrary.onPassageMaterials.entity.MaterialInformation;
-import org.springframework.beans.BeanUtils;
+import com.jeeplus.modules.sg.balancedlibrary.reportPerson.mapper.ReportPersonMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.List;
-import java.util.Map;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
@@ -49,6 +43,9 @@ public class MaterialReportDetailsService extends CrudService<MaterialReportDeta
     @Autowired
     private MaterialReportDetailsMapper materialReportDetailsMapper;
 
+    @Autowired
+    private ReportPersonMapper personMapper;
+
     @Override
     public MaterialReportDetails get(String id) {
         return super.get(id);
@@ -413,6 +410,19 @@ public class MaterialReportDetailsService extends CrudService<MaterialReportDeta
             m.setRegionalReplacementBatch(interceptString(m.getRegionalReplacementBatch()));
             m.setRegionalReplacementHouse(interceptString(m.getRegionalReplacementHouse()));
             m.setRegionalReplacementNumber(interceptString(m.getRegionalReplacementNumber()));
+
+            //设置提报人及提报部门
+            m.setReportPerson(m.getReportPerson());
+            if (m.getReportDepartment().equals("")) {
+                //根据提报人找到提报部门
+                String department = personMapper.getDepartmentByPerson(m.getReportPerson());
+                m.setReportDepartment(department);
+            }else {
+                m.setReportDepartment(m.getReportDepartment());
+            }
+            m.setRemark(m.getRemark());
+            m.setLiKuAmount(m.getLiKuAmount());
+
             //如过单位为千米 说明该对象物资被转换为米进行操作,重新转换为千米
             if (m.getUnit().equals(MaterialsUnitFlagEnum.KM.getUnit())) {
                 BigDecimal convert = new BigDecimal(1000);
@@ -591,4 +601,4 @@ public class MaterialReportDetailsService extends CrudService<MaterialReportDeta
         }).collect(Collectors.toList());
     }
 
-}
+}

+ 4 - 4
src/main/java/com/jeeplus/modules/sg/balancedlibrary/materialReportDetails/utils/ExportUtil.java

@@ -560,16 +560,16 @@ public class ExportUtil {
         if (val != null){
             switch (val){
                 case "HLA2":
-                    val="镇江";
+                    val="镇江大港仓库";
                     break;
                 case "HLB1":
-                    val="丹阳";
+                    val="丹阳阜阳仓库";
                     break;
                 case "HLC1":
-                    val="句容";
+                    val="句容福地仓库";
                     break;
                 case "HLD1":
-                    val="扬中";
+                    val="扬中普庆仓库";
                     break;
                 default:
                     break;

+ 2 - 4
src/main/java/com/jeeplus/modules/sg/balancedlibrary/reportPerson/mapper/ReportPersonMapper.java

@@ -5,13 +5,10 @@ package com.jeeplus.modules.sg.balancedlibrary.reportPerson.mapper;
 
 import com.jeeplus.core.persistence.BaseMapper;
 import com.jeeplus.core.persistence.annotation.MyBatisMapper;
-import com.jeeplus.modules.sg.balancedlibrary.liKuResourcePool.entity.LiKuResourcePool;
-import com.jeeplus.modules.sg.balancedlibrary.replaceMaterial.entity.ReplaceMaterial;
 import com.jeeplus.modules.sg.balancedlibrary.reportPerson.entity.ReportPerson;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
-import java.util.Set;
 
 /**
  * 提报人MAPPER接口
@@ -36,4 +33,5 @@ public interface ReportPersonMapper extends BaseMapper<ReportPerson> {
 
     List<ReportPerson> findDepartmentGroupByPerson();
 
-}
+    String getDepartmentByPerson(String person);
+}

+ 4 - 1
src/main/java/com/jeeplus/modules/sg/balancedlibrary/reportPerson/mapper/xml/ReportPersonMapper.xml

@@ -80,6 +80,9 @@
         on a.report_department = b.value
 
 	</select>
+    <select id="getDepartmentByPerson" resultType="java.lang.String">
+        SELECT report_department FROM bla_report_person WHERE report_person = #{person}
+    </select>
 
     <insert id="insert">
 		INSERT INTO bla_report_person(
@@ -151,4 +154,4 @@
 	</update>
 
 
-</mapper>
+</mapper>

+ 11 - 11
src/main/webapp/webpage/modules/sg/balancedlibrary/materialQuota/materialQuotaList.jsp

@@ -16,7 +16,7 @@
 		<h3 class="panel-title">物资限额列表</h3>
 	</div>
 	<div class="panel-body">
-	
+
 	<!-- 搜索 -->
 	<div id="search-collapse" class="collapse">
 		<div class="accordion-inner">
@@ -30,11 +30,11 @@
 			  <a  id="search" class="btn btn-primary btn-rounded  btn-bordered btn-sm"><i class="fa fa-search"></i> 查询</a>
 			  <a  id="reset" class="btn btn-primary btn-rounded  btn-bordered btn-sm" ><i class="fa fa-refresh"></i> 重置</a>
 			 </div>
-	    </div>	
+	    </div>
 	</form:form>
 	</div>
 	</div>
-	
+
 	<!-- 工具栏 -->
 	<div id="toolbar">
 		<shiro:hasPermission name="sg:balancedlibrary:materialQuota:del">
@@ -53,13 +53,13 @@
 				<i class="fa fa-file-excel-o"></i> 导出
 			</button>
 		 </shiro:hasPermission>
-		<shiro:hasPermission name="sg:balancedlibrary:materialQuota:import">
-			<button id="importMaterial" class="btn btn-info">
-				<i class="fa fa-folder-open-o"></i> 导入物资需求
-			</button>
-		</shiro:hasPermission>
+<%--		<shiro:hasPermission name="sg:balancedlibrary:materialQuota:import">--%>
+<%--			<button id="importMaterial" class="btn btn-info">--%>
+<%--				<i class="fa fa-folder-open-o"></i> 导入物资需求--%>
+<%--			</button>--%>
+<%--		</shiro:hasPermission>--%>
 	</div>
-		
+
 	<!-- 表格 -->
 	<table id="leave1Table"   data-toolbar="#toolbar"></table>
 
@@ -69,9 +69,9 @@
         <li data-item="delete"><a>删除</a></li>
         </shiro:hasPermission>
         <li data-item="action1"><a>取消</a></li>
-    </ul>  
+    </ul>
 	</div>
 	</div>
 	</div>
 </body>
-</html>
+</html>

+ 11 - 11
src/main/webapp/webpage/modules/sg/balancedlibrary/preferredMaterials/preferredMaterialsList.jsp

@@ -16,7 +16,7 @@
 		<h3 class="panel-title">优选物资列表</h3>
 	</div>
 	<div class="panel-body">
-	
+
 	<!-- 搜索 -->
 	<div id="search-collapse" class="collapse">
 		<div class="accordion-inner">
@@ -30,11 +30,11 @@
 			  <a  id="search" class="btn btn-primary btn-rounded  btn-bordered btn-sm"><i class="fa fa-search"></i> 查询</a>
 			  <a  id="reset" class="btn btn-primary btn-rounded  btn-bordered btn-sm" ><i class="fa fa-refresh"></i> 重置</a>
 			 </div>
-	    </div>	
+	    </div>
 	</form:form>
 	</div>
 	</div>
-	
+
 	<!-- 工具栏 -->
 	<div id="toolbar">
 		<shiro:hasPermission name="sg:balancedlibrary:preferredMaterials:del">
@@ -54,13 +54,13 @@
 			</button>
 		 </shiro:hasPermission>
 
-		<shiro:hasPermission name="sg:balancedlibrary:preferredMaterials:import">
-			<button id="importMaterial" class="btn btn-info">
-				<i class="fa fa-folder-open-o"></i> 导入物资需求
-			</button>
-		</shiro:hasPermission>
+<%--		<shiro:hasPermission name="sg:balancedlibrary:preferredMaterials:import">--%>
+<%--			<button id="importMaterial" class="btn btn-info">--%>
+<%--				<i class="fa fa-folder-open-o"></i> 导入物资需求--%>
+<%--			</button>--%>
+<%--		</shiro:hasPermission>--%>
 	</div>
-		
+
 	<!-- 表格 -->
 	<table id="leave1Table"   data-toolbar="#toolbar"></table>
 
@@ -70,9 +70,9 @@
         <li data-item="delete"><a>删除</a></li>
         </shiro:hasPermission>
         <li data-item="action1"><a>取消</a></li>
-    </ul>  
+    </ul>
 	</div>
 	</div>
 	</div>
 </body>
-</html>
+</html>

+ 11 - 11
src/main/webapp/webpage/modules/sg/balancedlibrary/standardMaterials/standardMaterialsList.jsp

@@ -16,7 +16,7 @@
 		<h3 class="panel-title">标准物资列表</h3>
 	</div>
 	<div class="panel-body">
-	
+
 	<!-- 搜索 -->
 	<div id="search-collapse" class="collapse">
 		<div class="accordion-inner">
@@ -30,11 +30,11 @@
 			  <a  id="search" class="btn btn-primary btn-rounded  btn-bordered btn-sm"><i class="fa fa-search"></i> 查询</a>
 			  <a  id="reset" class="btn btn-primary btn-rounded  btn-bordered btn-sm" ><i class="fa fa-refresh"></i> 重置</a>
 			 </div>
-	    </div>	
+	    </div>
 	</form:form>
 	</div>
 	</div>
-	
+
 	<!-- 工具栏 -->
 	<div id="toolbar">
 		<shiro:hasPermission name="sg:balancedlibrary:standardMaterials:del">
@@ -53,13 +53,13 @@
 				<i class="fa fa-file-excel-o"></i> 导出
 			</button>
 		 </shiro:hasPermission>
-		<shiro:hasPermission name="sg:balancedlibrary:standardMaterials:import">
-			<button id="importMaterial" class="btn btn-info">
-				<i class="fa fa-folder-open-o"></i> 导入物资需求
-			</button>
-		</shiro:hasPermission>
+<%--		<shiro:hasPermission name="sg:balancedlibrary:standardMaterials:import">--%>
+<%--			<button id="importMaterial" class="btn btn-info">--%>
+<%--				<i class="fa fa-folder-open-o"></i> 导入物资需求--%>
+<%--			</button>--%>
+<%--		</shiro:hasPermission>--%>
 	</div>
-		
+
 	<!-- 表格 -->
 	<table id="leave1Table"   data-toolbar="#toolbar"></table>
 
@@ -69,9 +69,9 @@
         <li data-item="delete"><a>删除</a></li>
         </shiro:hasPermission>
         <li data-item="action1"><a>取消</a></li>
-    </ul>  
+    </ul>
 	</div>
 	</div>
 	</div>
 </body>
-</html>
+</html>