zengtx vor 2 Jahren
Ursprung
Commit
1a77e896d9

+ 7 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocation.java

@@ -191,5 +191,12 @@ public class SyCostAllocation implements Serializable {
     @ApiModelProperty(value = "汇率")
     private BigDecimal exchangeRate;
 
+    /**供应商事故单美金金额*/
+    @ApiModelProperty(value = "供应商事故单美金金额")
+    private java.math.BigDecimal supperAccidentUsdamount;
+
+    /**供应商事故单人民币金额*/
+    @ApiModelProperty(value = "供应商事故单人民币金额")
+    private java.math.BigDecimal supperAccidentcnyAmount;
 
 }

+ 8 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/entity/SyCostAllocationAccident.java

@@ -97,4 +97,12 @@ public class SyCostAllocationAccident implements Serializable {
     @ApiModelProperty(value = "加工单位")
     private String processUnit;
 
+    /**供应商事故单美金金额*/
+    @ApiModelProperty(value = "供应商事故单美金金额")
+    private java.math.BigDecimal supperAccidentUsdamount;
+
+    /**供应商事故单人民币金额*/
+    @ApiModelProperty(value = "供应商事故单人民币金额")
+    private java.math.BigDecimal supperAccidentcnyAmount;
+
 }

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

@@ -20,4 +20,8 @@ public interface SyCostAllocationAccidentMapper extends BaseMapper<SyCostAllocat
 
 	@DS("multi-oa")
 	List<SyCostAllocationAccident> queryByCostAccident(String code);
+
+	@DS("multi-oa")
+	//查询供应商事故单金额,取值取事故单没有责任人的金额人民币和美元合计
+	SyCostAllocationAccident queryByCostAccidentAmount(String code);
 }

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

@@ -60,4 +60,19 @@
 					 and inv.cInvName='事故单'  and ah.cDefine2 like CONCAT(#{code},'%')
 					group by ah.cPBVCode,ven.cVenAbbName,ah.cDefine2;
 	-->
+
+	<select id="queryByCostAccidentAmount" resultType="org.jeecg.modules.cost.entity.SyCostAllocationAccident">
+
+select
+			case when its.money_type='美元' then ifnull(sum(it.total_money),0) end as supperAccidentUsdamount,
+			case when its.money_type='人民币' then ifnull(sum(it.total_money),0) end as supperAccidentcnyAmount
+		from incident_ticket it
+		join incident_ticket_children its on it.id=its.incident_ticket_id
+		where its.plan_number = #{code} and it.responsibility_person1 is null
+		and it.responsibility_person2 is null
+		and it.responsibility_person3 is null
+		and it.responsibility_person4 is null
+		and it.responsibility_person5 is null
+
+	</select>
 </mapper>

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

@@ -268,7 +268,7 @@ select
 		) and (i.cInvCcode like '03%' or i.cInvCcode like '04%') and i.cInvCCode != '0399' and i.cInvCCode != '0499' and i.cInvCCode != '0299' and i.cInvName = #{goodName}
 		 and rs.cBatch like CONCAT(#{code},'%')
 		GROUP BY rs.cFree1
-		)tab1 on tab1.cInvName=tab.goodsName
+		)tab1 on tab1.cInvName=tab.goodsName and tab1.color = tab.color
 
 
 		union all
@@ -302,7 +302,7 @@ select
 		) and (i.cInvCcode like '03%' or i.cInvCcode like '04%') and i.cInvCCode != '0399' and i.cInvCCode != '0499' and i.cInvCCode != '0299' and i.cInvName = #{goodName}
 		 and rs.cBatch like CONCAT(#{code},'%')
 		GROUP BY rs.cFree1
-		)tab1 on tab1.cInvName=tab.goodsName
+		)tab1 on tab1.cInvName=tab.goodsName and tab1.color = tab.color
 
 	</select>
 </mapper>

+ 4 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationServiceImpl.java

@@ -214,7 +214,10 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
                 syCostAllocation.setProcessUnit(syCostAllocation.getProcessUnit()+","+objs.getProcessUnit());
             }
         }
-
+        //供应商事故金额 美元和人民币
+        SyCostAllocationAccident accidentEntity = syCostAllocationAccidentMapper.queryByCostAccidentAmount(plannum);
+        syCostAllocation.setSupperAccidentcnyAmount(accidentEntity.getSupperAccidentcnyAmount());
+        syCostAllocation.setSupperAccidentUsdamount(accidentEntity.getSupperAccidentUsdamount());
 
         /*查询U8数据 面料*/
         List<SyCostAllocationFabric> list3 = syCostAllocationFabricMapper.queryByCostFabric(plannum);

+ 24 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/syShippingOrder/controller/SyShippingOrderController.java

@@ -1564,4 +1564,28 @@ public class SyShippingOrderController extends JeecgController<SyShippingOrder,
 		 return result;
 	 }
 
+	 /**
+	  * 定时推送
+	  * @param id
+	  * @return
+	  */
+	 @PostMapping(value = "/updateTimeStuta")
+	 public Result<String> updateTimeStuta(String id){
+		 Result<String> result = new Result<String>();
+
+		 if(oConvertUtils.isEmpty(id)){
+			 result.setResult("推送失败,ID为空!");
+			 result.setSuccess(false);
+			 return result;
+		 }
+
+		 SyShippingOrder entity = syShippingOrderService.getById(id);
+		 entity.setTimeStuta(1);
+		 syShippingOrderService.updateById(entity);
+
+		 result.setResult("推送成功!");
+		 result.setSuccess(false);
+		 return result;
+	 }
+
 }

+ 11 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/syShippingOrder/entity/SyShippingOrder.java

@@ -243,6 +243,17 @@ public class SyShippingOrder {
 	@ApiModelProperty(value = "经营单位国内外")
 	private String isAhaa;
 
+	/**定时状态*/
+	@Excel(name = "定时状态", width = 15)
+	@ApiModelProperty(value = "定时状态")
+	private Integer timeStuta;
+	
+	/**定时推送消息*/
+	@Excel(name = "定时推送消息", width = 15)
+	@ApiModelProperty(value = "定时推送消息")
+	private Integer timeMesage;
+	
+	
 	//成衣工厂
 	@TableField(exist = false)
 	private String garmentFactory;