yuansh 11 годин тому
батько
коміт
0f4e96d17a

+ 2 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysPermissionMapper.xml

@@ -243,7 +243,8 @@
 		    '/purchase/purchaseOrder/PurchaseOrderFormList',<!--采购订单-->
 		    '/inventiry/purchaseIn/purchaseInList',<!--采购入库-->
 		    '/inventiry/salesOutbound/salesOutboundList',<!--销售出库-->
-		    '/purchase/arrivedGoods/ArriveGoodsList'<!--到货单-->
+		    '/purchase/arrivedGoods/ArriveGoodsList',<!--到货单-->
+		    '/saleCode/salesInvoice/salesInvoiceList'<!--销售发票-->
 			)
 
 		group by p.id order by p.create_time

+ 1 - 0
srm-module-code/src/main/java/org/jeecg/modules/purCode/mapper/PurOrderShipMapper.java

@@ -39,4 +39,5 @@ public interface PurOrderShipMapper extends BaseMapper<PurOrderShip> {
 	public int purchaseInListNum();
 	public int salesOutboundListNum();
 	public int ArriveGoodsListNum();
+	public int salesInvoiceList();
 }

+ 6 - 0
srm-module-code/src/main/java/org/jeecg/modules/purCode/mapper/xml/PurOrderShipMapper.xml

@@ -96,5 +96,11 @@
 		where a.del_flag=0 and a.submit=1 and a.close = 0
 		  and b.id is null
 	</select>
+	<select id="salesInvoiceList" resultType="int">
+
+		SELECT count(1)
+		from sale_invoice a
+		where a.process = 0 and a.del_flag=0 and a.close = 0
+	</select>
 
 </mapper>

+ 6 - 0
srm-module-code/src/main/java/org/jeecg/modules/purCode/service/impl/PurOrderServiceImpl.java

@@ -124,6 +124,12 @@ public class PurOrderServiceImpl extends ServiceImpl<PurOrderMapper, PurOrder> i
 				o.setPermsType("ArriveGoodsListNum");
 				o.setComponentName("采购订单>>到货单(Arrival List)");
 			}
+			if("/saleCode/salesInvoice/salesInvoiceList".equals(url)){
+				num = purOrderShipMapper.salesInvoiceList();
+				o.setPerms("销售流程");
+				o.setPermsType("salesInvoiceListNum");
+				o.setComponentName("财务开票>>销售发票(Invoice List)");
+			}
 			o.setDescription(String.valueOf(num));
 		}
 

+ 3 - 2
srm-module-code/src/main/java/org/jeecg/modules/purCode/service/impl/PurQuotationSelectionServiceImpl.java

@@ -14,6 +14,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -100,8 +101,8 @@ public class PurQuotationSelectionServiceImpl extends ServiceImpl<PurQuotationSe
                 }
             }
         }
-        purQuotationSelection.setTotalAmount(totalAmount);
-        purQuotationSelection.setTotalAmountUsd(totalAmountUsd);
+        purQuotationSelection.setTotalAmount(totalAmount.setScale(2, RoundingMode.HALF_UP));
+        purQuotationSelection.setTotalAmountUsd(totalAmountUsd.setScale(2, RoundingMode.HALF_UP));
 
         purQuotationSelectionMapper.insert(purQuotationSelection);
         if (purQuotationSelectionShipList != null && purQuotationSelectionShipList.size() > 0) {

+ 22 - 0
srm-module-code/src/main/java/org/jeecg/modules/saleCode/controller/SaleInvoiceController.java

@@ -474,6 +474,28 @@ public class SaleInvoiceController {
         return Result.OK("提交作废!");
     }
 
+    /**
+     *
+     * @return
+     */
+    @AutoLog(value = "销售发票-处理")
+    @ApiOperation(value = "销售发票-处理", notes = "销售发票-处理")
+    @GetMapping(value = "/updateProcess")
+    public Result<String> updateProcess(@RequestParam(name = "codes", required = true) String codes) {
+
+        if(StringUtils.isBlank(codes) || Arrays.asList(codes.split(",")).size() == 0){
+            return Result.error("请选择数据!");
+        }
+
+        LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+
+        int st = saleInvoiceService.updateProcess("1",sysUser.getUsername(),Arrays.asList(codes.split(",")));
+        if(st > 0){
+            return Result.OK("执行成功!");
+        }
+        return Result.error("执行失败,请刷新后重试!");
+    }
+
     /**
      * 批量提交
      *

+ 1 - 0
srm-module-code/src/main/java/org/jeecg/modules/saleCode/mapper/SaleInvoiceMapper.java

@@ -19,4 +19,5 @@ public interface SaleInvoiceMapper extends BaseMapper<SaleInvoice> {
 
     public IPage<SaleInvoice> selectSaleInvoicePage(Page<SaleInvoice> page, @Param("ew") QueryWrapper<SaleInvoice> queryWrapper);
 
+    public int updateProcess(@Param("process") String process,@Param("processBy") String processBy,@Param("codeList")List<String> codeList);
 }

+ 10 - 0
srm-module-code/src/main/java/org/jeecg/modules/saleCode/mapper/xml/SaleInvoiceMapper.xml

@@ -17,4 +17,14 @@
             ${ew.customSqlSegment}
 
     </select>
+    
+    <update id="updateProcess">
+        update sale_invoice set process = #{process},process_by=#{processBy},process_time = now()
+        where invoice_code in
+        <foreach item="code" index="index" collection="codeList" open="(" separator="," close=")">
+            #{code}
+        </foreach>
+    </update>
+    
+    
 </mapper>

+ 1 - 0
srm-module-code/src/main/java/org/jeecg/modules/saleCode/service/ISaleInvoiceService.java

@@ -19,6 +19,7 @@ import java.util.List;
  */
 public interface ISaleInvoiceService extends IService<SaleInvoice> {
 
+	public int updateProcess(String process,String processBy,List<String> code);
 	/**
 	 * 分页查询
 	 * @param page

+ 5 - 0
srm-module-code/src/main/java/org/jeecg/modules/saleCode/service/impl/SaleInvoiceServiceImpl.java

@@ -56,6 +56,11 @@ public class SaleInvoiceServiceImpl extends ServiceImpl<SaleInvoiceMapper, SaleI
 	private IPlatCommissionOrderService platCommissionOrderService;
 
 
+	@Override
+	public int updateProcess(String process,String processBy,List<String> code){
+
+		return saleInvoiceMapper.updateProcess(process,processBy,code);
+	}
 	/**
 	 * 分页查询
 	 * @param page