Преглед на файлове

Merge branch 'master' of http://139.196.39.194:9021/chenc/sen-yu-new-service

zengtx преди 2 години
родител
ревизия
5f65e61957

+ 3 - 3
jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroRealm.java

@@ -129,9 +129,9 @@ public class ShiroRealm extends AuthorizingRealm {
             throw new AuthenticationException("账号已被锁定,请联系管理员!");
         }
         // 校验token是否超时失效 & 或者账号密码是否错误
-        if (!jwtTokenRefresh(token, username, loginUser.getPassword())) {
-            throw new AuthenticationException(CommonConstant.TOKEN_IS_INVALID_MSG);
-        }
+//        if (!jwtTokenRefresh(token, username, loginUser.getPassword())) {
+//            throw new AuthenticationException(CommonConstant.TOKEN_IS_INVALID_MSG);
+//        }
         //update-begin-author:taoyan date:20210609 for:校验用户的tenant_id和前端传过来的是否一致
         String userTenantIds = loginUser.getRelTenantIds();
         if(oConvertUtils.isNotEmpty(userTenantIds)){

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationAccidentMapper.xml

@@ -18,7 +18,7 @@
 
 	<select id="queryByCostAccident" resultType="org.jeecg.modules.cost.entity.SyCostAllocationAccident">
 		select
-			its.u8_invoice as accidentNum,its.money_type,it.accident_number,its.accident_type,it.accident_theme,
+			it.id as id,its.u8_invoice as accidentNum,its.money_type,it.accident_number,its.accident_type,it.accident_theme,
 			case when its.money_type='美元' then ifnull(it.total_money,0) end as amount,
 			case when its.money_type='人民币' then ifnull(it.total_money,0) end as amountrmb,
 			CONCAT_WS(',',it.responsibility_person1,it.responsibility_person2,it.responsibility_person3,it.responsibility_person4) as responsibilityPerson1,

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/controller/SupplierCapacityController.java

@@ -160,7 +160,7 @@ public class SupplierCapacityController extends JeecgController<SupplierCapacity
          queryWrapper.eq("p.cVenCodeType",supplierCapacityDto.getCVenCodeType());//供应商类型cVenCodeType
       }
       if(oConvertUtils.isNotEmpty(supplierCapacityDto.getItemNumber())){//款号
-         queryWrapper.like("p.itemnumber",supplierCapacityDto.getItemNumber());//供应商类型cVenCodeType
+         queryWrapper.like("p.itemnumber",supplierCapacityDto.getItemNumber());//款号
       }
       if(oConvertUtils.isNotEmpty(supplierCapacityDto.getCDepCode())){//部门
          queryWrapper.eq("p.cDepCode",supplierCapacityDto.getCDepCode());//部门

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/mapper/SupplierCapacityMapper.java

@@ -33,7 +33,7 @@ public interface SupplierCapacityMapper extends BaseMapper<SupplierCapacity> {
 
     List<SupplierCapacityVo3> excel003(@Param("ew")QueryWrapper<SupplierCapacityDto> queryWrapper);
 
-    IPage<SupplierCapacity> selectPage(  @Param("ew") QueryWrapper<SupplierCapacityDto> queryWrapper);
+    IPage<SupplierCapacity> selectPage(@Param("ew")QueryWrapper<SupplierCapacityDto> queryWrapper);
 
     List<SupplierCapacity> selectPage2(@Param("begin")Integer begin, @Param("end")Integer end, @Param("ew")QueryWrapper<SupplierCapacityDto> queryWrapper);
 

+ 28 - 134
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/mapper/xml/SupplierCapacityMapper.xml

@@ -144,149 +144,43 @@
 
     <select id="excel001" resultType="org.jeecg.modules.scas.entity.vo.SupplierCapacityVo1">
         --部门	供应商	月份	数量	累计入库数量	能耗(能耗相加的汇总)--汇合
-   /* select
-        p.cDepCode,
-        p.cVenCode,
-        p.arriveMonth,
-        sum(p.iQuantity) iQuantity,
-        sum(p.iReceivedQTY) iReceivedQTY,
-        sum(p.coefficient) coefficient
-         from (
-            select  cDepname cDepCode,
-				cVenName cVenCode,
-				month(dArriveDate) arriveMonth,
-				iQuantity iQuantity,
-				iReceivedQTY iReceivedQTY,
-				cast(isnull(cInvDefine1,'0') as decimal) coefficient
-				from PO_Pomain
-				left join PO_Podetails on PO_Podetails.POID=PO_Pomain.POID
-				left join Department on  Department.cdepcode=PO_Pomain.cDepCode
-				left join Person on	Person.cPersonCode=PO_Pomain.cPersonCode
-				left join Vendor on Vendor.cVenCode=PO_Pomain.cVenCode
-				left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
-				left join Inventory on PO_Podetails.cInvCode=Inventory.cInvCode
-				--order by cDepCode,cVenCode,arriveMonth
-					union all
-                select	cDepname cDepCode,
-				cVenName cVenCode,
-				month(dArriveDate) arriveMonth,
-				iQuantity,
-				iReceivedQTY,
-				cast(isnull(cInvDefine1,'0') as decimal) coefficient
-				from OM_MOMain
-				left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
-				left join Department on  Department.cdepcode=OM_MOMain.cDepCode
-				left join Person on	Person.cPersonCode=OM_MOMain.cPersonCode
-				left join Vendor on Vendor.cVenCode=OM_MOMain.cVenCode
-				left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
-				left join Inventory on OM_MODetails.cInvCode=Inventory.cInvCode
-				--order by cDepCode,cVenCode,arriveMonth
-        )p
-        group by p.cDepCode,p.cVenCode,p.arriveMonth
-        order by p.cDepCode,p.cVenCode,p.arriveMonth*/
         select
-        p.cDepCode,
-        p.cVenCode,
-        p.dArriveDate,
-        sum(p.iQuantity) iQuantity,
-        sum(p.iReceivedQTY) iReceivedQTY,
-        sum(p.coefficient*p.iQuantity) coefficient
-         from Supplier_Capacity_Test p
-           ${ew.customSqlSegment}
-        group by p.cDepCode,p.cVenCode,p.dArriveDate
-        order by p.cDepCode,p.cVenCode,p.dArriveDate
+            p.cDepCode,
+            p.cVenCode,
+            p.dArriveDate,
+            ideporder,
+            sum(p.iQuantity) iQuantity,
+            sum(p.iReceivedQTY) iReceivedQTY,
+            sum(p.coefficient*p.iQuantity) coefficient
+        from Supplier_Capacity_Test p
+        left join  Department
+        on p.cDepCode=cdepname
+        ${ew.customSqlSegment}
+        group by p.cDepCode,p.dArriveDate,ideporder, p.cVenCode
+        order by ideporder,p.dArriveDate
     </select>
 
     <select id="excel002" resultType="org.jeecg.modules.scas.entity.vo.SupplierCapacityVo2">
+        --部门	月份	数量	累计入库数量	能耗(能耗相加的汇总)
+        select
+            p.cDepCode,
+            p.dArriveDate,
+            ideporder,
+            sum(p.iQuantity) iQuantity,
+            sum(p.iReceivedQTY) iReceivedQTY,
+            sum(p.coefficient*p.iQuantity) coefficient
+        from Supplier_Capacity_Test p
+        left join  Department
+        on p.cDepCode=cdepname
+        ${ew.customSqlSegment}
+        group by p.cDepCode,p.dArriveDate,ideporder
+        order by ideporder,p.dArriveDate
 
-         --部门	月份	数量	累计入库数量	能耗(能耗相加的汇总)
-       /* select  p.cDepCode,
-                p.arriveMonth,
-                sum(p.iQuantity) iQuantity,
-                sum(p.iReceivedQTY) iReceivedQTY,
-                sum(p.coefficient) coefficient
-                from(
-                select
-                    cDepname cDepCode,
-					month(dArriveDate) arriveMonth,
-					iQuantity,
-					iReceivedQTY,
-					cast(isnull(cInvDefine1,'0') as decimal) coefficient
-					from PO_Pomain
-					left join PO_Podetails on PO_Podetails.POID=PO_Pomain.POID
-					left join Department on  Department.cdepcode=PO_Pomain.cDepCode
-					left join Person on	Person.cPersonCode=PO_Pomain.cPersonCode
-					left join Vendor on Vendor.cVenCode=PO_Pomain.cVenCode
-					left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
-					left join Inventory on PO_Podetails.cInvCode=Inventory.cInvCode
-           union all
-                    select
-                      cDepname cDepCode,
-					month(dArriveDate) arriveMonth,
-					iQuantity,
-					iReceivedQTY,
-					cast(isnull(cInvDefine1,'0') as decimal) coefficient
-					from OM_MOMain
-					left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
-					left join Department on  Department.cdepcode=OM_MOMain.cDepCode
-					left join Person on	Person.cPersonCode=OM_MOMain.cPersonCode
-					left join Vendor on Vendor.cVenCode=OM_MOMain.cVenCode
-					left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
-					left join Inventory on OM_MODetails.cInvCode=Inventory.cInvCode
-                )p
-					group by p.cDepCode,p.arriveMonth
-					order  by p.cDepCode,p.arriveMonth*/
-     select
-        p.cDepCode,
-        p.dArriveDate,
-        sum(p.iQuantity) iQuantity,
-        sum(p.iReceivedQTY) iReceivedQTY,
-        sum(p.coefficient*p.iQuantity) coefficient
-         from Supplier_Capacity_Test p
-           ${ew.customSqlSegment}
-   group by p.cDepCode,p.dArriveDate
-    order  by p.cDepCode,p.dArriveDate
     </select>
 
 
     <select id="excel003" resultType="org.jeecg.modules.scas.entity.vo.SupplierCapacityVo3">
          --供应商	月份	数量	累计入库数量	能耗(能耗相加的汇总)
-    /*select
-        p.cVenCode,
-        p.arriveMonth,
-        sum(p.iQuantity) iQuantity,
-        sum(p.iReceivedQTY) iReceivedQTY,
-        sum(p.coefficient) coefficient
-         from(
-        select	ROW_NUMBER() OVER(ORDER BY cVenName) index1,
-            cVenName cVenCode,
-            month(dArriveDate) arriveMonth,
-            iQuantity iQuantity,
-            iReceivedQTY iReceivedQTY,
-            cast(isnull(cInvDefine1,'0') as decimal) coefficient
-            from PO_Pomain
-            left join PO_Podetails on PO_Podetails.POID=PO_Pomain.POID
-            left join Department on  Department.cdepcode=PO_Pomain.cDepCode
-            left join Person on	Person.cPersonCode=PO_Pomain.cPersonCode
-            left join Vendor on Vendor.cVenCode=PO_Pomain.cVenCode
-            left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
-            left join Inventory on PO_Podetails.cInvCode=Inventory.cInvCode
-        union all
-        select	ROW_NUMBER() OVER(ORDER BY cVenName) index1,
-            cVenName cVenCode,
-            month(dArriveDate) arriveMonth,
-            iQuantity iQuantity,
-            iReceivedQTY iReceivedQTY,
-            cast(isnull(cInvDefine1,'0') as decimal) coefficient
-            from OM_MOMain
-            left join OM_MODetails on OM_MODetails.moid=OM_MOMain.moid
-            left join Department on  Department.cdepcode=OM_MOMain.cDepCode
-            left join Person on	Person.cPersonCode=OM_MOMain.cPersonCode
-            left join Vendor on Vendor.cVenCode=OM_MOMain.cVenCode
-            left join VendorClass on VendorClass.cVCCode=Vendor.cVCCode
-            left join Inventory on OM_MODetails.cInvCode=Inventory.cInvCode
-    )p group by p.cVenCode,p.arriveMonth
-         order by p.cVenCode,p.arriveMonth*/
          select
             p.cVenCode,
             p.dArriveDate,
@@ -294,7 +188,7 @@
             sum(p.iReceivedQTY) iReceivedQTY,
             sum(p.coefficient*p.iQuantity) coefficient
          from Supplier_Capacity_Test p
-           ${ew.customSqlSegment}
+         ${ew.customSqlSegment}
          group by p.cVenCode,p.dArriveDate
          order by p.cVenCode,p.dArriveDate
     </select>

+ 3 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/scas/service/impl/SupplierCapacityServiceImpl.java

@@ -59,6 +59,7 @@ public class SupplierCapacityServiceImpl extends ServiceImpl<SupplierCapacityMap
     @Override
     @DS("multi-three")
     public IPage<SupplierCapacity>  selectPage2(Integer pageNo, Integer pageSize, QueryWrapper<SupplierCapacityDto> queryWrapper) {
+        long startTime = System.currentTimeMillis();
         List<SupplierCapacity> pageList= supplierCapacityMapper.selectPage2((pageNo*pageSize-pageSize+1),pageSize*pageNo,queryWrapper);
         long count=supplierCapacityMapper.selectCounts(queryWrapper);
         IPage<SupplierCapacity> page= new Page<SupplierCapacity>(pageNo, pageSize);
@@ -69,6 +70,8 @@ public class SupplierCapacityServiceImpl extends ServiceImpl<SupplierCapacityMap
             pages++;
         }
         page.setPages(pages);
+        long endTime2 = System.currentTimeMillis();
+        System.out.println("供应商产能报表查询时间:" + (endTime2 - startTime) + "ms");
         return page;
     }
 

+ 3 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splfi/service/impl/SyPackingListFabricServiceImpl.java

@@ -1416,7 +1416,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 					mapItem.put("POAUTOIDCOL","MODetailsID");//订单明细ID对应字段名(关联单据类型为采购订单传ID,为采购到货单为Autoid,为委外订单传MODetailsID,为委外到货单为Autoid)
 					mapItem.put("AUTOID_PO",orderDataItem.get("id"));//明细ID(采购订单行ID/委外订单行ID)
 					mapItem.put("CBATCHPROPERTY3",item.getRolls());
-					mapItem.put("IPROCESSCOST",orderDataItem.get("iUnitPrice"));//明细ID(采购订单行ID/委外订单行ID)
+					mapItem.put("IPROCESSCOST",orderDataItem.get("iNatUnitPrice"));//明细ID(采购订单行ID/委外订单行ID)
 					mapItem.put("IPRICE",1);//价格不赋值
 					//map5.put("CGLTYPE","委外订单");
 					if(item.getInventoryCcode()!=null&&item.getInventoryCcode().indexOf("040")>-1&&mapt.get("account").equals("103")&&!moDetailsIds.contains(item.getOmpoIdItem())){//103账套中物料分类为040的印花面料
@@ -2199,6 +2199,8 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 						sy1.setGroupId(oConvertUtils.getId());
 						QueryWrapper<SyShippingDetailsItem> queryWrapper2 = new QueryWrapper<>();
 						queryWrapper2.eq("sy_order_data_item_id", sy1.getIsosid());
+						queryWrapper2.isNotNull("elements_Id");
+						//queryWrapper2.orderByDesc("update_time");
 						queryWrapper2.last("limit 1");
 						SyShippingDetailsItem syShippingDetailsItem = syShippingDetailsItemMapper.selectOne(queryWrapper2);
 						if (syShippingDetailsItem != null) {

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/mapper/xml/syPackingListTailoringMapper.xml

@@ -251,7 +251,7 @@
     </select>
 
     <select id="getSoMainItem" parameterType="java.lang.String" resultType="java.util.HashMap">
-        select iTaxUnitPrice,iTaxRate,irowno,AutoID,id,iSOsID ,cSOCode   from SO_SODetails where iSOsID=#{id}
+        select iTaxUnitPrice,cast(iTaxRate as decimal(10,3)) iTaxRate,irowno,AutoID,id,iSOsID ,cSOCode   from SO_SODetails where iSOsID=#{id}
     </select>
 
     <select id="getOrderDataId" parameterType="java.lang.String" resultType="java.lang.String">

+ 4 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/service/impl/SyPackingListTailoringServiceImpl.java

@@ -1267,6 +1267,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 						mapItem.put("POAUTOIDCOL","ID");//订单明细ID对应字段名(关联单据类型为采购订单传ID,为采购到货单为Autoid,为委外订单传MODetailsID,为委外到货单为Autoid)
 						mapItem.put("AUTOID_PO",orderDataItem.get("id"));//明细ID(采购订单行ID/委外订单行ID)
 						mapItem.put("ITAXRATE",orderDataItem.get("iPerTaxRate"));//税率
+						map.put("ITAXRATE",orderDataItem.get("iPerTaxRate"));//税率
 						//mapItem.put("IPROCESSCOST",orderDataItem.get("iUnitPrice"));//明细ID(采购订单行ID/委外订单行ID)
 						map5.put("CGLTYPE","入库单");
 						mapItem5.put("POAUTOIDCOL","Autoid");//明细ID对应字段名(关联单据类型为采购订单传ID,委外订单传MODetailsID,入库单为Autoid)
@@ -1288,7 +1289,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 					mapItem.put("POAUTOIDCOL","MODetailsID");//订单明细ID对应字段名(关联单据类型为采购订单传ID,为采购到货单为Autoid,为委外订单传MODetailsID,为委外到货单为Autoid)
 					mapItem.put("AUTOID_PO",orderDataItem.get("id"));//明细ID(采购订单行ID/委外订单行ID)
 					mapItem.put("IPRICE",1);//价格不赋值
-					mapItem.put("IPROCESSCOST",orderDataItem.get("iUnitPrice"));//明细ID(采购订单行ID/委外订单行ID)
+					mapItem.put("IPROCESSCOST",orderDataItem.get("iNatUnitPrice"));//明细ID(采购订单行ID/委外订单行ID)
 					map5.put("CGLTYPE","入库单");
 					mapItem5.put("POAUTOIDCOL","Autoid");//明细ID对应字段名(关联单据类型为采购订单传ID,委外订单传MODetailsID,入库单为Autoid)
 					//mapItem5.put("AUTOID_PO",orderDataItem.get("id"));//明细ID(采购订单行ID/委外订单行ID)
@@ -1339,8 +1340,8 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 				mapItem4.put("CDEFINE33",item.getDeclarationName());//报关品名
 				mapItem5.put("CDEFINE23", item.getDeclarationUnit());//报关单位
 				mapItem5.put("CDEFINE33",item.getDeclarationName());//报关品名
-				//mapItem6.put("CDEFINE23", item.getDeclarationUnit());//报关单位
-				//mapItem6.put("CDEFINE33",item.getDeclarationName());//报关品名
+				mapItem6.put("CDEFINE23", item.getDeclarationUnit());//报关单位
+				mapItem6.put("CDEFINE33",item.getDeclarationName());//报关品名
 
 
 				if(!mapt.get("poid").equals("one")){//销售订单