소스 검색

供应商

dongke 1 년 전
부모
커밋
b9adf02ece

+ 1 - 0
src/main/java/com/dk/mdm/mapper/mac/MacTransferMapper.xml

@@ -143,6 +143,7 @@
         tmo.org_name  ,
         tms.staff_name   ,
         makestaff.staff_name
+        order by t.make_time desc
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}
         </if>

+ 3 - 3
src/main/java/com/dk/mdm/model/vo/mst/GoodsSkuVO.java

@@ -78,10 +78,10 @@ public class GoodsSkuVO implements Serializable {
 
 
     /**
-     * 入库金额
+     * 成本价格
      */
-    @ApiModelProperty(value = "入库金额")
-    private BigDecimal intoAmt;
+    @ApiModelProperty(value = "成本价格")
+    private BigDecimal priceInto;
 
     /**
      * 商品名称

+ 3 - 3
src/main/java/com/dk/mdm/service/mac/AccountService.java

@@ -696,7 +696,7 @@ public class AccountService extends BaseService<Account> {
             inboundMapper.update(null, updateWrapper);
         }
         // 其他支出单
-        else if ("t_mac_other_payable".equals(biznisType)) {
+        else if ("".equals(biznisType)) {
             OtherPayable otherPayable = otherPayableMapper.selectByIdForUpdate(invoiceId);
             objectId = otherPayable.getObjectId();
 
@@ -710,7 +710,7 @@ public class AccountService extends BaseService<Account> {
             }
 
             // 插入账款明细
-            accountItemInsert.setAccItemType(Constant.accItemType.YING_SHOU.getName())
+            accountItemInsert.setAccItemType(Constant.accItemType.YING_FU.getName())
                     .setObjectId(objectId).setOrgId(otherPayable.getOrgId()).setStaffId(otherPayable.getStaffId())
                     .setAccDate(otherPayable.getAccDate()).setRecStatus(Constant.recStatuse.QUE_DING.getName())
                     .setAmtShould(otherPayable.getSumAmtPayable()).setAmtResidue(otherPayable.getSumAmtPayable())
@@ -765,7 +765,7 @@ public class AccountService extends BaseService<Account> {
             inboundMapper.update(null, updateWrapper);
         }
         // 其他支出单
-        else if ("t_mac_other_payable".equals(biznisType)) {
+        else if ("".equals(biznisType)) {
             OtherPayable otherPayable = otherPayableMapper.selectByIdForUpdate(invoiceId);
             objectId = otherPayable.getObjectId();
 

+ 4 - 5
src/main/java/com/dk/mdm/service/mst/GoodsSkuService.java

@@ -101,14 +101,13 @@ public class GoodsSkuService extends BaseService<GoodsSku> {
 		goodsSku.setSkuCode(codeMap.get("outNote").toString());
 		super.insert(goodsSku);
 
-		if(goodsSkuVO.getWhId()!=null){
+		if(goodsSkuVO.getWhId()!=null){ //生成入库单数据  插入存货表
 			  String StaffId = authUtils.getStaff().getStaffId();
-
 			//总单
 			InboundVO inboundVO = new InboundVO();
 			inboundVO.setIntoType(Constant.IntoType.BEGIN.getName());
 			inboundVO.setIntoingQty(goodsSkuVO.getIntoQty());
-			inboundVO.setIntoingAmt(goodsSkuVO.getIntoAmt());
+			inboundVO.setIntoingAmt(goodsSkuVO.getIntoQty().multiply(goodsSkuVO.getPriceInto()));
 			inboundVO.setStaffId(StaffId);
 			inboundVO.setMakeStaff(StaffId);
 			inboundVO.setOrgId(goodsSkuVO.getOrgId());
@@ -121,8 +120,8 @@ public class GoodsSkuService extends BaseService<GoodsSku> {
 			List<InboundItemVO> inboundItemVOList = new ArrayList<>();
 			InboundItemVO inboundItemVO = new InboundItemVO();
 			inboundItemVO.setIntoingQty(goodsSkuVO.getIntoQty());
-			inboundItemVO.setIntoingAmt(goodsSkuVO.getIntoAmt());
-			inboundItemVO.setPriceInto(goodsSkuVO.getIntoAmt());
+			inboundItemVO.setIntoingAmt(goodsSkuVO.getIntoQty().multiply(goodsSkuVO.getPriceInto()));
+			inboundItemVO.setPriceInto(goodsSkuVO.getPriceInto());
 			inboundItemVO.setIntoQty(goodsSkuVO.getIntoQty());
 			inboundItemVO.setItemIndex(0);
 			inboundItemVO.setSkuId(goodsSku.getSkuId());