Merge remote-tracking branch 'origin/master'

# Conflicts:
#	jnpf-java-boot/jnpf-admin/src/main/resources/mapper/scm/CwsettlementMapper.xml
#	jnpf-java-boot/jnpf-web/src/components/Jnpf/PopupSelect/index.vue
#	jnpf-java-boot/jnpf-web/src/views/extend/cwsettlement/index.vue
#	jnpf-java-boot/jnpf-web/src/views/extend/paymentapplication/form.vue
#	jnpf-java-boot/jnpf-web/src/views/extend/paymentapplication/index.vue
jg-waiwang-pro
胡川虎 3 months ago
commit 232a3ff431

@ -169,6 +169,8 @@ public class GatewayWhite {
whiteUrl.add("/api/scm/Cwpaymentreceipt/downloadPdf/**");
whiteUrl.add("/api/scm/BusinessOrder/exportPdf/**");
whiteUrl.add("/api/scm/PaymentApplication/downloadPdf/**");
whiteUrl.add("/api/scm/BusinessOrder/exportBusinessPdf/**");
}
private void excludePath(){

@ -99,6 +99,8 @@
<result column="realName" property="realName"/>
<result column="realNameA" property="realNameA"/>
<result column="taxCount" property="taxCount"/>
<result column="erp_mark" property="erpMark"/>
<result column="erp_massage" property="erpMassage"/>
<result column="yunguan_mark" property="yunguanMark"/>
<result column="yunguan_massage" property="yunguanMassage"/>
<result column="yunguan_time" property="yunguanTime"/>
@ -171,6 +173,8 @@
<result column="purchaseStatus" property="purchaseStatus"/>
<result column="wareHouseName" property="wareHouseName"/>
<result column="addressName" property="addressName"/>
<result column="erp_mark" property="erpMark"/>
<result column="erp_massage" property="erpMassage"/>
<result column="yunguan_mark" property="yunguanMark"/>
<result column="yunguan_massage" property="yunguanMassage"/>
<result column="yunguan_time" property="yunguanTime"/>
@ -209,6 +213,8 @@
<result column="businessPrice" property="businessPrice"></result>
<result column="tax" property="tax"></result>
<result column="salesMainUnitId" property="salesMainUnitId"></result>
<result column="code" property="code"></result>
</resultMap>
<resultMap id="getProductWarehouseMap" type="jnpf.entity.ProductWarehouseEntity">
@ -251,7 +257,8 @@
c.f_full_name AS enterpriseName,
d.contract_name AS relatedContractName,
e.name AS secondCustomName,
h.name AS businessName
h.name AS businessName,
a.contract_num AS contractNum
FROM
jg_contract a
LEFT JOIN jg_subject_basic b ON a.subject = b.id
@ -282,7 +289,8 @@
d.contract_name AS relatedContractName,
e.name AS secondSupplyName,
f.name AS thirdSupplyName,
h.name AS businessName
h.name AS businessName,
a.contract_num AS contractNum
FROM
jg_contract a
LEFT JOIN jg_subject_basic b ON a.subject = b.id
@ -343,6 +351,40 @@
AND g.f_status = 2
</select>
<select id="queryBusinessContractSale" resultMap="contractList">
SELECT
a.*,
b.name AS firstSupplyName,
c.f_full_name AS enterpriseName,
d.contract_name AS relatedContractName,
e.name AS secondSupplyName,
f.name AS thirdSupplyName,
h.name AS businessName
FROM
jg_contract a
LEFT JOIN jg_subject_basic b ON a.subject = b.id
AND b.f_delete_mark IS NULL
LEFT JOIN base_organize c ON a.dept_id = c.f_id
AND c.f_delete_mark IS NULL
LEFT JOIN jg_contract d ON a.related_contract_id = d.id
AND d.f_delete_mark IS NULL
LEFT JOIN jg_subject_basic e ON a.subject2 = e.id
AND e.f_delete_mark IS NULL
LEFT JOIN jg_subject_basic f ON a.subject3 = f.id
AND f.f_delete_mark IS NULL
LEFT JOIN flow_task g ON a.id = g.f_process_id and g.f_delete_mark is null
LEFT JOIN jg_business_line h ON a.business_id=h.id AND h.f_delete_mark IS NULL
WHERE
a.contract_type = '2'
AND a.business_id = #{businessLine}
AND a.contract_number = #{contractNumber}
AND DATE_FORMAT( a.contract_period_time, '%Y-%m-%d' ) &lt;= DATE_FORMAT( NOW( ), '%Y-%m-%d' )
AND DATE_FORMAT( a.contract_period_time_end, '%Y-%m-%d' ) &gt;= DATE_FORMAT( NOW( ), '%Y-%m-%d' )
AND a.f_delete_mark IS NULL
AND a.organize_json_id like concat('%',#{organize},'%')
AND g.f_status = 2
</select>
<select id="querySaleOrder" resultMap="saleOrder">
SELECT
@ -646,7 +688,8 @@
JgFnUnitArrName ( b.sales_main_unit_id )) AS saleMainUnitId1,
b.sales_order_quantity_down as salesOrderQuantityDown,
b.sales_order_quantity_upper as salesOrderQuantityUpper,
b.sales_order_multiple as salesOrderMultiple
b.sales_order_multiple as salesOrderMultiple,
b.code AS code
FROM
`jg_contract_commodity` a
LEFT JOIN jg_product b ON a.product_id = b.id and b.f_delete_mark is null
@ -863,9 +906,9 @@
a.expect_arrive_date_start AS DELV_DT,
b.CODE AS SUPPLIER_CD,
b.NAME AS SUPPLIER_NM,
b.reserved_fields4 AS SUPPLIER_SITE_ID,
b.reserved_fields5 AS RESERVE2,
'CYN' AS CURRENCY_CD,
b.reserved_fields5 AS SUPPLIER_SITE_ID,
b.reserved_fields4 AS RESERVE2,
'CNY' AS CURRENCY_CD,
CASE
a.transaction_mode
WHEN '1' THEN
@ -927,7 +970,7 @@
'' as CHECK_EMP_ID,
null as CHECK_DTM,
'B' as ORD_STATUS,
a.f_creator_user_id as CREATE_EMP_ID,
e.f_real_name as CREATE_EMP_ID,
a.f_creator_time as CREATE_DTM,
'N' as READ_FLAG,
null as READ_TIME,
@ -963,20 +1006,20 @@
b.id AS ID,
c.f_en_code AS COMP_CD,
a.CODE AS ORD_NO,
LPAD(b.ord_ln,2,0) as ORD_LN,
LPAD(b.ord_ln,3,0) as ORD_LN,
d.CODE AS ITEM_CD,
d.NAME AS ITEM_NM,
d.spec AS SPEC_TYPE,
b.spec AS SPEC_TYPE,
b.business_num AS QUANTITY,
b.sales_main_unit_id AS UNIT,
f.price_rate AS CONTR_PRICE,
b.not_tax_price AS PRICE,
b.business_price AS TAX_PRICE,
b.tax AS TAX_RATE,
f.tax_rate_code AS TAX_RATE_CD,
concat('VAT_IN_',b.tax) AS TAX_RATE_CD,
b.not_tax_count AS AMOUNT,
b.tax_count AS TOTAL_AMOUNT,
'CYN' AS CURRENCY_CD,
'CNY' AS CURRENCY_CD,
a.expect_arrive_date_start AS DELV_DT,
f.delv_tol_max as DELV_TOL_MAX,
f.delv_tol_min as DELV_TOL_MIN,
@ -1265,4 +1308,15 @@
f_delete_mark IS NULL AND business_order_id = #{id}
</select>
<select id="queryBusinessContractSum" resultType="java.math.BigDecimal">
SELECT
SUM(plan_purchase_num) AS plan_purchase_num
FROM
jg_business_order
WHERE
contract_id = #{id}
</select>
</mapper>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.ContractRelationMapper">
</mapper>

@ -102,6 +102,7 @@
SELECT
a.product_id productId,
b.spec spec,
b.code code,
a.inventory_unit_id inventoryUnitId,
a.sales_main_unit_id purchaseUnitId,
a.sales_main_unit_id settlementUnit,
@ -144,6 +145,7 @@
SELECT
a.product_id productId,
b.spec spec,
b.code code,
a.inventory_unit_id inventoryUnitId,
a.sales_main_unit_id purchaseUnitId,
a.sales_main_unit_id settlementUnit,
@ -186,6 +188,7 @@
SELECT
a.product_id productId,
b.spec spec,
b.code code,
a.inventory_unit_id inventoryUnitId,
a.sales_main_unit_id purchaseUnitId,
a.sales_main_unit_id settlementUnit,
@ -228,6 +231,7 @@
SELECT
a.product_id productId,
b.spec spec,
b.code code,
a.inventory_unit_id inventoryUnitId,
a.sales_main_unit_id purchaseUnitId,
a.sales_main_unit_id settlementUnit,
@ -270,6 +274,7 @@
SELECT
a.product_id productId,
b.spec spec,
b.code code,
a.inventory_unit_id inventoryUnitId,
a.sales_main_unit_id purchaseUnitId,
a.sales_main_unit_id settlementUnit,
@ -309,6 +314,7 @@
SELECT
a.product_id productId,
b.spec spec,
b.code code,
a.inventory_unit_id inventoryUnitId,
a.sales_main_unit_id purchaseUnitId,
a.sales_main_unit_id settlementUnit,
@ -351,6 +357,7 @@
SELECT
a.product_id productId,
b.spec spec,
b.code code,
a.inventory_unit_id inventoryUnitId,
a.sales_main_unit_id purchaseUnitId,
a.sales_main_unit_id settlementUnit,
@ -390,6 +397,7 @@
SELECT
a.product_id productId,
b.spec spec,
b.code code,
a.inventory_unit_id inventoryUnitId,
a.sales_main_unit_id purchaseUnitId,
a.sales_main_unit_id settlementUnit,

@ -34,6 +34,8 @@
<result column="realName" property="realName"/>
<result column="realNameA" property="realNameA"/>
<result column="settlement_sum" property="settlementSum"/>
<result column="erp_mark" property="erpMark"/>
<result column="erp_massage" property="erpMassage"/>
<result column="apply_state" property="applyState"/>
<result column="invoice_amount" property="invoiceAmount"/>
<result column="yunguan_mark" property="yunguanMark"/>

@ -89,4 +89,28 @@
GROUP BY a.product_id,a.batch_number
</select>
<select id="queryExecl" resultMap="getInventoryMap">
SELECT a.*,
c.f_full_name productTypeName,
d.brand_name brandName,
e.unit_name inventoryUnitName,
f.name warehouseName,
g.cargo_name storageAreaName,
SUM(a.inventory_number) inventoryNumberSum
from jg_inventory a
LEFT JOIN jg_product b on a.product_id = b.id
LEFT JOIN (SELECT * from base_dictionary_data where f_dictionary_type_id = '521699870097015173' and f_delete_mark is null) c on a.product_type_id = c.f_en_code
LEFT JOIN jg_product_brand d on a.brand_id = d.id
LEFT JOIN (SELECT aa.*,bb.product_unit_code from jg_product_unitwarehouse aa LEFT JOIN jg_product_unit bb on aa.id = bb.product_unitwarehouse_id WHERE aa.F_Delete_mark is null and bb.F_delete_mark is null) e on a.inventory_unit_id = e.product_unit_code
LEFT JOIN jg_business_line f on a.warehouse_id = f.id
LEFT JOIN jg_business_cargo g on a.storage_area_id = g.id
${ew.customSqlSegment} and a.f_delete_mark is null and b.f_delete_mark is null
and c.f_delete_mark is null and d.f_delete_mark is null and e.f_delete_mark is null and f.f_delete_mark is null and g.f_delete_mark is null
and a.inventory_number>0
GROUP BY
a.id
</select>
</mapper>

@ -67,6 +67,7 @@
<result column="productId" property="productId"/>
<result column="vehicle_number" property="vehicleNumber"/>
<result column="productName" property="productName"/>
<result column="productCode" property="productCode"/>
<result column="poundlist_time" property="poundlistTime"/>
<result column="delivery_type" property="deliveryType"/>
<result column="is_used" property="isUsed"/>
@ -457,6 +458,7 @@
d.unit,
e.vehicle_number,
f.NAME AS productName,
f.code AS productCode,
a.purchase_contract_no AS purchaseContractNo,
a.sale_contract_no AS saleContractNo,
a.purchase_amount AS purchaseAmount,

@ -21,6 +21,8 @@
<result column="realName" property="realName"/>
<result column="realNameA" property="realNameA"/>
<result column="outNumber" property="outNumber"/>
<result column="erp_mark" property="erpMark"/>
<result column="erp_massage" property="erpMassage"/>
<result column="yunguan_mark" property="yunguanMark"/>
<result column="yunguan_massage" property="yunguanMassage"/>
<result column="yunguan_time" property="yunguanTime"/>
@ -138,7 +140,7 @@
aa.spec AS SPECIFICATION,
aa.outbound_unit AS UNIT,
aa.outbound_number AS OUT_QUANTITY,
'1' as OUT_FLAG,
'2' as OUT_FLAG,
s.contract_no as contract_no,
g.f_real_name as CREATE_EMP_ID,
a.f_creator_time as CREATE_DTM,
@ -153,10 +155,15 @@
null as ESB_DTM,
'' as ESB_MESSAGE,
IF(a.warehousing_outbound_type = 1,LPAD(n.ord_ln,3,0),LPAD(o.ord_ln,3,0)) as SAL_LINE,
aa.batch_number as BATCH_ID
aa.batch_number as BATCH_ID,
IF(ad.code,concat(ad.code,'-',LPAD(ad.ord_ln,3,0)),concat(ac.business_order_no,'-',LPAD(ab.ord_ln,3,0))) as PUR_ORDER
FROM
jg_warehousing_outbound a
RIGHT JOIN jg_warehousing_outbound_product aa ON a.id = aa.warehousing_outbound_id AND aa.f_delete_mark is null
LEFT JOIN jg_warehousing_storage_product ab ON aa.batch_number = ab.batch_number AND ab.f_delete_mark is null
LEFT JOIN jg_warehousing_storage ac ON ab.warehousing_storage_id = ac.id AND ac.f_delete_mark is null
LEFT JOIN jg_business_batch ad ON aa.batch_number = ad.batch_number AND ad.f_delete_mark is null
LEFT JOIN jg_warehousing_notification b ON a.warehousing_id = b.id AND b.f_delete_mark IS NULL
LEFT JOIN jg_business_order c ON b.business_id = c.id AND c.f_delete_mark IS NULL
LEFT JOIN jg_subject_basic d ON c.first_subject_basic_id = d.id AND d.f_delete_mark IS NULL
@ -180,7 +187,8 @@
AND a.id = #{id}
</select>
<!-- <select id="saleOutBoundProductByYunGuan" resultType="jnpf.model.yunguan.YunguanSaleOutBoundModel">-->
<!-- <select id="saleOutBoundProductByYunGuan" resultType="jnpf.model.yunguan.YunguanSaleOutBoundModel">-->
<!-- SELECT-->
<!-- b.CODE AS MAT_ID,-->
<!-- b.NAME AS MAT_NAME,-->

@ -21,6 +21,8 @@
<result column="realNameA" property="realNameA"/>
<result column="realityNumber" property="realityNumber"/>
<result column="business_order_no" property="businessOrderNo"/>
<result column="erp_mark" property="erpMark"/>
<result column="erp_massage" property="erpMassage"/>
<result column="yunguan_mark" property="yunguanMark"/>
<result column="yunguan_massage" property="yunguanMassage"/>
<result column="yunguan_time" property="yunguanTime"/>
@ -111,7 +113,8 @@
a.f_creator_time storageTime,
case a.warehousing_storage_type WHEN 1 THEN '采购入库' WHEN 15 THEN '采购收货单入库' END warehousingStorageType,
e.name warehouseName
e.name warehouseName,
a.yunguan_mark as yunguanMark
from jg_warehousing_storage a
LEFT JOIN flow_task b on a.id = b.f_process_id
LEFT JOIN jg_warehousing_notification c ON a.warehousing_id = c.id
@ -139,7 +142,8 @@
(SELECT SUM(storage_number) from jg_warehousing_storage_product WHERE warehousing_storage_id = a.id) outboundNumber,
a.f_creator_time storageTime,
case a.warehousing_storage_type WHEN 1 THEN '采购入库' WHEN 15 THEN '采购收货单入库' END warehousingStorageType,
e.name warehouseName
e.name warehouseName,
a.yunguan_mark as yunguanMark
from jg_warehousing_storage a
LEFT JOIN flow_task b on a.id = b.f_process_id
LEFT JOIN jg_receipt_order c ON a.warehousing_id = c.id
@ -368,7 +372,7 @@
a.document_no AS RECEIPT_NO,
a.warehousing_time AS RECEIPT_DTM,
IF(a.warehousing_storage_type = '1',c.code,l.code) as ORD_NO,
aa.ord_ln as ORD_LN,
LPAD(aa.ord_ln,3,0) as ORD_LN,
IF(a.warehousing_storage_type = '1',h.contract_number,q.contract_number) AS CON_CD,
IF(a.warehousing_storage_type = '1',h.contract_no,q.contract_no) AS CON_NO,
IF(a.warehousing_storage_type = '1',d.code,p.code) AS SUPPLIER_CD,

@ -21,6 +21,7 @@
<result column="theoryNum" property="theoryNum"></result>
<result column="isInput" property="isInput"></result>
<result column="bomId" property="bomId"></result>
<result column="code" property="code"></result>
</resultMap>
<resultMap id="workOrder" type="jnpf.entity.WorkOrderEntity">
@ -41,6 +42,11 @@
<result column="f_last_modify_user_id" property="lastModifyUserId"></result>
<result column="realName" property="realName"></result>
<result column="productName" property="productName"></result>
<result column="productCode" property="productCode"></result>
<result column="unitId" property="unitId"></result>
<result column="proportionNum" property="proportionNum"></result>
<result column="erp_mark" property="erpMark"/>
<result column="erp_massage" property="erpMassage"/>
<result column="yunguan_mark" property="yunguanMark"/>
<result column="yunguan_massage" property="yunguanMassage"/>
<result column="yunguan_time" property="yunguanTime"/>
@ -69,9 +75,11 @@
b.id,
b.id AS productId,
b.NAME AS NAME,
b.spec,
b.code AS code,
a.spec,
b.bar_code AS barCode,
a.is_input AS isInput,
a.code,
CASE
b.inventory_type
WHEN 1 THEN
@ -102,6 +110,7 @@
b.id,
b.id AS productId,
b.NAME AS NAME,
b.code AS code,
b.spec,
b.bar_code AS barCode,
a.is_input AS isInput,
@ -137,14 +146,18 @@
a.*,
b.NAME AS businessfactory ,
c.NAME AS businessName,
d.f_real_name AS realName
d.f_real_name AS realName,
f.proportion_num AS proportionNum,
f.unit_id AS unitId,
e.name AS productName,
e.code AS productCode
FROM
jg_work_order a
LEFT JOIN jg_business_line b ON a.businessfactory_id = b.id
LEFT JOIN jg_business_line c ON a.business_id = c.id
LEFT JOIN base_user d ON a.f_creator_user_id = d.f_id
LEFT JOIN jg_product e ON a.product_id = e.id
LEFT JOIN jg_work_order_product f ON a.id = f.work_id
${ew.customSqlSegment}
GROUP BY
a.id
@ -157,8 +170,8 @@
<select id="queryWorkOrderProductByYunguan" resultType="jnpf.model.yunguan.YunguanProductProcessModel">
select
a.id as ID,
m.yunguan_value as ORGANIZATION_CODE,
l.f_full_name as ORGANIZATION_NM,
IF(l.f_full_name = '日照济钢金属科技有限公司','RJ1',m.yunguan_value) as ORGANIZATION_CODE,
IF(l.f_full_name = '日照济钢金属科技有限公司','日照济钢金属科技有限公司(生产)',l.f_full_name) as ORGANIZATION_NM,
a.code as TASK_NO,
'产出' as PRD_TY,
d.code as ITEM_CD,
@ -191,7 +204,8 @@
'' as ERR_MESSAGE,
'N' as ESB_STATUS,
null as ESB_DTM,
'' as ESB_MESSAGE
'' as ESB_MESSAGE,
o.f_en_code as ADD_DEPT_CODE
from jg_work_order a
right join jg_work_order_product b on a.id = b.work_id and b.f_delete_mark is null
left join jg_product d on b.product_id = d.id and d.f_delete_mark is null
@ -201,24 +215,25 @@
left join jg_bom_item j on i.id = j.bom_id and j.f_delete_mark is null
left join jg_product k on j.product_id = k.id and k.f_delete_mark is null
left join base_organize l on a.company_id = l.f_id and l.f_delete_mark is null
left join jg_dictionary_yunguan_data m on m.type_id = '564773000885326917' and m.zhihui_value = l.f_full_name and m.f_delete_mark is null
left join jg_dictionary_yunguan_data m on m.type_id = '564773000885326917' and m.zhihui_value like concat('%',l.f_full_name) and m.f_delete_mark is null
left join jg_business_cargo n on b.cargo_id = n.id and n.f_delete_mark is null
left join base_organize o on a.department_id = o.f_id and o.f_delete_mark is null
where a.f_delete_mark is null and a.id =#{id}
</select>
<select id="queryWorkOrderPrimaryByYunguan" resultType="jnpf.model.yunguan.YunguanProductProcessModel">
select
a.id as ID,
m.yunguan_value as ORGANIZATION_CODE,
l.f_full_name as ORGANIZATION_NM,
IF(l.f_full_name = '日照济钢金属科技有限公司','RJ1',m.yunguan_value) as ORGANIZATION_CODE,
IF(l.f_full_name = '日照济钢金属科技有限公司','日照济钢金属科技有限公司(生产)',l.f_full_name) as ORGANIZATION_NM,
a.code as TASK_NO,
case c.is_input
when '1' then '原料'
when '2' then '副产品'
end as PRD_TY,
end as PROD_TY,
d.code as ITEM_CD,
d.name as ITEM_NM,
'原料' as PROD_TY,
'投入' as PRD_TY,
c.spec as SPEC_TYPE,
c.reality_num as QUANTITY,
a.work_time as PRD_DATE,
@ -229,7 +244,14 @@
a.code as TASK_NM,
c.batch_number as BATCH_ID,
'已完成' as STATUS_FLAG,
e.name as ATTR1,
case e.name
when '日照金属打包线' then '打包产线'
when '日照金属剪切线' then '剪切产线'
when '日照金属破碎线' then '破碎产线'
when '日照金属火切线' then '火切产线'
when '日照金属众鹏委托加工线' then '众鹏委托加工产线'
when '日照金属龙口委托加工线' then '龙口委托加工产线'
end as ATTR1,
k.code as ATTR2,
k.name as ATTR3,
h.f_real_name as CREATE_EMP_ID,
@ -239,7 +261,8 @@
'' as ERR_MESSAGE,
'N' as ESB_STATUS,
null as ESB_DTM,
'' as ESB_MESSAGE
'' as ESB_MESSAGE,
o.f_en_code as ADD_DEPT_CODE
from jg_work_order a
left join jg_work_order_product b on a.id = b.work_id and b.f_delete_mark is null
right join jg_work_order_primary c on a.id = c.work_id and c.f_delete_mark is null
@ -250,8 +273,9 @@
left join jg_bom_item j on i.id = j.bom_id and j.f_delete_mark is null
left join jg_product k on j.product_id = k.id and k.f_delete_mark is null
left join base_organize l on a.company_id = l.f_id and l.f_delete_mark is null
left join jg_dictionary_yunguan_data m on m.type_id = '564773000885326917' and m.zhihui_value = l.f_full_name and m.f_delete_mark is null
left join jg_dictionary_yunguan_data m on m.type_id = '564773000885326917' and m.zhihui_value like concat('%',l.f_full_name) and m.f_delete_mark is null
left join jg_business_cargo n on c.cargo_id = n.id and n.f_delete_mark is null
left join base_organize o on a.department_id = o.f_id and o.f_delete_mark is null
where a.f_delete_mark is null and a.id =#{id}
</select>

@ -324,4 +324,9 @@
select SUM(delivery_num) from jg_delivery_product_relation
where f_delete_mark is null and order_id = #{processId}
</select>
<select id="getNetWeightBypayment" resultType="java.math.BigDecimal">
select apply_weight from jg_cw_payment_application
where f_delete_mark is null and id = #{processId}
</select>
</mapper>

@ -29,6 +29,10 @@ public class DataInterfaceVarConst {
*
*/
public static final String ORG = "@organization";
/**
*
*/
public static final String det = "@department";
/**
*
*/

@ -216,5 +216,14 @@ public interface FlowTaskService extends SuperService<FlowTaskEntity> {
*/
BigDecimal getNetWeight(String flowName,String processId);
/**
*
* @return
*/
BigDecimal getNetWeightPayment(String flowName,String processId);
/**
*
* @return
*/
void remove(FlowTaskEntity flowTaskEntity);
}

@ -81,5 +81,9 @@ public interface BusinessOrderMapper extends BaseMapper<BusinessOrderEntity> {
List<BusinessOrderEntity> getbusinessOrdLn(String id);
List<ContractLEntity> queryBusinessContract(@Param("businessLine") String businessLine,@Param("organize") String organize,@Param("contractNumber") String contractNumber);
//销售业务线带出合同信息
List<ContractLEntity> queryBusinessContractSale(@Param("businessLine") String businessLine,@Param("organize") String organize,@Param("contractNumber") String contractNumber);
BigDecimal queryBusinessContractSum(@Param("id") String id);
}

@ -0,0 +1,16 @@
package jnpf.mapper;
import jnpf.entity.ContractRelationEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* contractRelation
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-07-15
*/
public interface ContractRelationMapper extends BaseMapper<ContractRelationEntity> {
}

@ -31,4 +31,6 @@ public interface InventoryMapper extends BaseMapper<InventoryEntity> {
* @return
*/
List<InventoryEntity> queryByKeywordNotPage();
List<InventoryEntity> queryExecl(@Param("ew") QueryWrapper<InventoryEntity> queryWrapper);
}

@ -97,6 +97,9 @@ public interface BusinessOrderService extends IService<BusinessOrderEntity> {
void getPdfInfo(BusinessOrderEntity businessOrderEntity, HttpServletResponse response, String token) throws Exception;
void getPdfBusinessInfo(BusinessOrderEntity businessOrderEntity, HttpServletResponse response, String token) throws Exception;
Map printPDF(BusinessOrderEntity businessOrderEntity, HttpServletResponse response) throws Exception;
BigDecimal getSaleAmountSumInfo(String id);
@ -106,4 +109,9 @@ public interface BusinessOrderService extends IService<BusinessOrderEntity> {
//根据业务线带出合同
List<ContractLEntity> queryBusinessContractInfo(String businessLine,String contractNumber);
//根据业务线带出销售合同
List<ContractLEntity> queryBusinessContractSaleInfo(String businessLine,String contractNumber);
BigDecimal queryBusinessContractSum(String id);
}

@ -43,9 +43,14 @@ public interface ContractLService extends IService<ContractLEntity> {
List<ContractLPaymentEntity> getContractLPaymentList(String id);
List<ContractRelationEntity> getContractRelationList(String id);
//副表数据方法
String checkForm(ContractLForm form,int i);
void saveOrUpdate(ContractLForm contractLForm,String id, boolean isSave) throws Exception;
void saveOrUpdateContract(ContractLForm contractLForm,String id, boolean isSave) throws Exception;
}

@ -0,0 +1,35 @@
package jnpf.service;
import jnpf.model.contractrelation.*;
import jnpf.entity.*;
import java.util.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
/**
* contractRelation
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-07-15
*/
public interface ContractRelationService extends IService<ContractRelationEntity> {
List<ContractRelationEntity> getList(ContractRelationPagination contractRelationPagination);
List<ContractRelationEntity> getTypeList(ContractRelationPagination contractRelationPagination,String dataType);
ContractRelationEntity getInfo(String id);
void delete(ContractRelationEntity entity);
void create(ContractRelationEntity entity);
boolean update(String id, ContractRelationEntity entity);
//子表方法
//副表数据方法
String checkForm(ContractRelationForm form,int i);
void saveOrUpdate(ContractRelationForm contractRelationForm,String id, boolean isSave) throws Exception;
}

@ -35,4 +35,6 @@ public interface InventoryService extends IService<InventoryEntity> {
void saveOrUpdate(InventoryForm inventoryForm,String id, boolean isSave) throws Exception;
List<InventoryEntity> queryByKeywordNotPage();
}

@ -318,6 +318,21 @@ public class BusinessOrderServiceImpl extends ServiceImpl<BusinessOrderMapper, B
}
if(ObjectUtil.isNotEmpty(businessOrderPagination.getContractNumber())){
businessOrderNum++;
String value = String.valueOf(businessOrderPagination.getContractNumber());
businessOrderQueryWrapper.eq("c.contract_number",value);
}
if(ObjectUtil.isNotEmpty(businessOrderPagination.getCustomer())){
businessOrderNum++;
String value = String.valueOf(businessOrderPagination.getCustomer());
businessOrderQueryWrapper.eq("d.name",value);
}
if(ObjectUtil.isNotEmpty(businessOrderPagination.getDeliveryType())){
businessOrderNum++;
@ -1485,6 +1500,91 @@ public class BusinessOrderServiceImpl extends ServiceImpl<BusinessOrderMapper, B
}
}
@Override
public void getPdfBusinessInfo(BusinessOrderEntity businessOrderEntity, HttpServletResponse response, String token) throws Exception {
// 临时文件夹地址
// String s = UUID.randomUUID().toString();
// String templateFilePath = FileUploadUtils.getLocalBasePath() + configValueUtil.getTemplateFilePath() + "info\\"+s+"\\";
// FileCopy.createFile(templateFilePath);
LambdaQueryWrapper<BusinessOrderEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(BusinessOrderEntity::getCode, businessOrderEntity.getCode());
businessOrderEntity = this.getOne(wrapper);
//查询总数量和总金额
List<HashMap<String, Object>> info = businessOrderMapper.getWordExcelInfo(businessOrderEntity.getCode());
if(info == null || info.size() == 0){
info = businessOrderMapper.getWordExcelInfo2(businessOrderEntity.getCode());
}
if (info != null && info.size() > 0) {
BigDecimal settlement = new BigDecimal("0");
BigDecimal amount = new BigDecimal("0");
for (HashMap<String, Object> hashMap : info) {
settlement = settlement.add(new BigDecimal(hashMap.get("settlement").toString()));
amount = amount.add(new BigDecimal(hashMap.get("purchasePrice").toString()));
}
String settlementPdf = settlement.toString()+"_"+businessOrderEntity.getCompanyId()+"_"+businessOrderEntity.getDepartmentId();
String settlementExcel= settlement.toString()+"_"+businessOrderEntity.getCompanyId();
// 任务集合
if ("ZZ202404160003".equals(businessOrderEntity.getCompanyId())) {
// 子线程计数器
CountDownLatch countDownLatch = new CountDownLatch(5);
// 创建线程池
ExecutorService executorService = Executors.newFixedThreadPool(5);
try {
BusinessOrderEntity finalBusinessOrderEntity = businessOrderEntity;
executorService.execute(() -> {
try {
this.getPdf1(finalBusinessOrderEntity,response,settlementPdf);
} catch (Exception e) {
throw new RuntimeException(e);
}
// 关闭子线程
countDownLatch.countDown();
});
// 等待所有子线程执行完
countDownLatch.await();
} catch (Exception e) {
log.error("等待所有子线程执行完发生错误:" + e.getMessage());
e.printStackTrace();
} finally {
// 线程池不接受新任务
executorService.shutdown();
}
// this.getZIP(templateFilePath, response,settlement.toString());
}else{
// 子线程计数器
CountDownLatch countDownLatch = new CountDownLatch(4);
// 创建线程池
ExecutorService executorService = Executors.newFixedThreadPool(4);
try {
BusinessOrderEntity finalBusinessOrderEntity1 = businessOrderEntity;
executorService.execute(() -> {
try {
this.getPdf1(finalBusinessOrderEntity1,response,settlementPdf);
} catch (Exception e) {
throw new RuntimeException(e);
}
// 关闭子线程
countDownLatch.countDown();
});
// 等待所有子线程执行完
countDownLatch.await();
} catch (Exception e) {
log.error("等待所有子线程执行完发生错误:" + e.getMessage());
e.printStackTrace();
} finally {
// 线程池不接受新任务
executorService.shutdown();
}
// this.getZIP(templateFilePath, response,settlement.toString());
}
} else {
log.error("采购订单号出错!查不到该采购订单!");
}
}
@Override
public BigDecimal getSaleAmountSumInfo(String id) {
return businessOrderMapper.getSaleAmountSum(id);
@ -1506,6 +1606,22 @@ public class BusinessOrderServiceImpl extends ServiceImpl<BusinessOrderMapper, B
return businessOrderMapper.queryBusinessContract(businessLine,organize,contractNumber);
}
@Override
public List<ContractLEntity> queryBusinessContractSaleInfo(String businessLine, String contractNumber) {
UserInfo userInfo=userProvider.get();
OrganizeEntity organizeEntity = organizeService.getInfo(userInfo.getOrganizeId());
List<String> organizeJsonId = Arrays.stream(organizeEntity.getCompanyIdTree().split(",")).collect(Collectors.toList());
String organize = JSON.toJSONString(organizeJsonId);
organize = organize.replace("[","");
organize = organize.replace("]","");
return businessOrderMapper.queryBusinessContractSale(businessLine,organize,contractNumber);
}
@Override
public BigDecimal queryBusinessContractSum(String id) {
return businessOrderMapper.queryBusinessContractSum(id);
}
public void getExcel(List<HashMap<String, Object>> list, String templateFilePath,String settlements,BigDecimal amount) throws Exception {
String[] strings = settlements.split("_");
settlements=strings[0];
@ -2405,4 +2521,118 @@ public class BusinessOrderServiceImpl extends ServiceImpl<BusinessOrderMapper, B
}
/**
* @param businessOrderEntity
*
* @throws Exception
*/
public void getPdf1(BusinessOrderEntity businessOrderEntity , HttpServletResponse response,String settlements) throws Exception {
String[] s = settlements.split("_");
settlements=s[0];
String companyName=s[1];
String departmentName=s[2];
QueryWrapper<BusinessOrderProductRelationalEntity> businessOrderProductRelationalEntityQueryWrapper = new QueryWrapper<>();
businessOrderProductRelationalEntityQueryWrapper.lambda().eq(BusinessOrderProductRelationalEntity::getBusinessOrderId,businessOrderEntity.getId());
List<BusinessOrderProductRelationalEntity> BusinessOrderProductRelationalEntitys = businessOrderProductRelationalService.list(businessOrderProductRelationalEntityQueryWrapper);
ContractLEntity contractLEntity = contractLService.getById(businessOrderEntity.getContractId());
SubjectbasicEntity subjectbasicEntity = subjectbasicService.getById(businessOrderEntity.getFirstSubjectBasicId());
byte[] bytes = null;
HttpHeaders headers = null;
ByteArrayOutputStream out = null;
ExportPdf exportPdf = new ExportPdf();
Map map = new HashMap();
//pdf表标题
OrganizeEntity organizeEntityDdf =organizeService.getInfo(companyName);
if (organizeEntityDdf!=null){
map.put("title", organizeEntityDdf.getFullName()+"采购订单");
}
//pdf部门
OrganizeEntity organizeEntityDdfDept =organizeService.getInfo(departmentName);
if (organizeEntityDdfDept!=null){
map.put("name", organizeEntityDdfDept.getFullName());
}
// map.put("title", companyName+"采购订单");
// map.put("name", departmentName);
map.put("creatorTime", new SimpleDateFormat("yyyy-MM-dd").format(businessOrderEntity.getCreatorTime()));
map.put("contractNo", contractLEntity.getContractNo());
map.put("contractCode", contractLEntity.getContractNumber());
map.put("supplierName", subjectbasicEntity.getName());
map.put("documentNo", businessOrderEntity.getCode());
BigDecimal settlementSum = new BigDecimal("0");
BigDecimal amountSum = new BigDecimal("0");
List<Map> reportList = new ArrayList<>();
for (BusinessOrderProductRelationalEntity businessOrderProductRelationalEntity : BusinessOrderProductRelationalEntitys) {
Map map1 = new HashMap();
map1.put("itemCode", "");
map1.put("itemName", businessOrderProductRelationalEntity.getName());
map1.put("rate", businessOrderProductRelationalEntity.getTax());
map1.put("price", businessOrderProductRelationalEntity.getBusinessPrice());
map1.put("settlement", businessOrderProductRelationalEntity.getBusinessNum());
map1.put("unit", businessOrderProductRelationalEntity.getSalesMainUnitId());
map1.put("amount", businessOrderProductRelationalEntity.getTaxCount());
settlementSum = settlementSum.add(businessOrderProductRelationalEntity.getBusinessNum());
amountSum = amountSum.add(new BigDecimal(businessOrderProductRelationalEntity.getTaxCount()));
reportList.add(map1);
}
map.put("settlementSum", settlementSum);
map.put("amountSum", amountSum);
map.put("reportList", reportList);
// word模板
// out = exportPdf.createPdf(map, "test.ftl", "/templates/export");
// bytes = out.toByteArray();
// String fileName = "采购订单(" + map.get("supplierName") + settlementSum+"吨).pdf";
// fileName = URLEncoder.encode(fileName, "utf-8");
// word模板
try {
out = exportPdf.createPdf(map, "test.ftl", "/templates/export");
bytes = out.toByteArray();
out.close();
} catch (Exception e) {
throw new RuntimeException(e);
}
String fileName = "采购订单(" + map.get("supplierName") + settlementSum+"吨).pdf";
// HttpServletResponse response = ServletUtil.getResponse();
response.reset();
String excelTitle = fileName;
String filen = null;
try {
filen = URLEncoder.encode(excelTitle, "UTF-8").replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
// 设置response的Header
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + filen);
response.setContentType("application/x-download;charset=utf-8");
BufferedOutputStream toClient = null;
try {
toClient = new BufferedOutputStream(response.getOutputStream());
toClient.write(out.toByteArray());
toClient.flush();
toClient.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
log.warn("pdf文件生成成功");
//// 存在本地文件中
// InputStream inputStream = new ByteArrayInputStream(bytes);
// MultipartFile file = new MultipartFileDto(ContentType.APPLICATION_OCTET_STREAM.toString(), inputStream);
//// FileUtil.upFile(file, templateFilePath+"/wc/", fileName);
// File f = new File(templateFilePath, fileName);
//
// //将上传的文件存储到指定位置
// file.transferTo(f);
//
// inputStream.close();
// log.warn("pdf文件生成成功");
}
}

@ -61,6 +61,8 @@ public class ContractLServiceImpl extends ServiceImpl<ContractLMapper, ContractL
private ContractLFeeClauseService contractLFeeClauseService;
@Autowired
private ContractLPaymentService contractLPaymentService;
@Autowired
private ContractRelationService contractRelationService;
@Resource
private ContractLMapper contractLMapper;
@Autowired
@ -337,6 +339,18 @@ public class ContractLServiceImpl extends ServiceImpl<ContractLMapper, ContractL
}
if(ObjectUtil.isNotEmpty(contractLPagination.getKeyword())){
contractLNum++;
String value = String.valueOf(contractLPagination.getKeyword());
contractLQueryWrapper.like("a.contract_number",value);
}
if(contractLPagination.getExcludeIdList() != null && contractLPagination.getExcludeIdList().size() > 0){
contractLNum++;
contractLQueryWrapper.notIn("a.contract_number",contractLPagination.getExcludeIdList());
}
if(ObjectUtil.isNotEmpty(contractLPagination.getContractName())){
contractLNum++;
@ -553,6 +567,14 @@ public class ContractLServiceImpl extends ServiceImpl<ContractLMapper, ContractL
queryWrapper.lambda().eq(ContractLPaymentEntity::getContractId, id);
return contractLPaymentService.list(queryWrapper);
}
@Override
public List<ContractRelationEntity> getContractRelationList(String id) {
QueryWrapper<ContractRelationEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ContractRelationEntity::getBusinessId, id);
return contractRelationService.list(queryWrapper);
}
/** 验证表单唯一字段,正则,非空 i-0新增-1修改*/
@Override
public String checkForm(ContractLForm form,int i) {
@ -679,4 +701,43 @@ public class ContractLServiceImpl extends ServiceImpl<ContractLMapper, ContractL
}
}
}
@Override
public void saveOrUpdateContract(ContractLForm contractLForm, String id, boolean isSave) throws Exception {
UserInfo userInfo=userProvider.get();
UserEntity userEntity = generaterSwapUtil.getUser(userInfo.getUserId());
contractLForm = JsonUtil.getJsonToBean(
generaterSwapUtil.swapDatetime(ContractLConstant.getFormData(),contractLForm),ContractLForm.class);
ContractLEntity entity = JsonUtil.getJsonToBean(contractLForm, ContractLEntity.class);
if(isSave){
String mainId = id ;
entity.setId(mainId);
entity.setFlowId(contractLForm.getFlowId());
entity.setVersion(0);
entity.setCurrency("1"); //币种默认人民币
}else{
entity.setFlowId(contractLForm.getFlowId());
}
this.saveOrUpdate(entity);
//ContractRelation子表数据新增修改
if(!isSave){
QueryWrapper<ContractRelationEntity> contractRelationQueryWrapper = new QueryWrapper<>();
contractRelationQueryWrapper.lambda().eq(ContractRelationEntity::getBusinessId, entity.getId());
contractRelationService.remove(contractRelationQueryWrapper);
}
if (contractLForm.getContractRelationList()!=null){
List<ContractRelationEntity> tableField1531 = JsonUtil.getJsonToList(contractLForm.getContractRelationList(),ContractRelationEntity.class);
for(ContractRelationEntity entitys : tableField1531){
entitys.setId(RandomUtil.uuId());
entitys.setBusinessId(entity.getId());
if(isSave){
}else{
}
contractRelationService.saveOrUpdate(entitys);
}
}
}
}

@ -0,0 +1,258 @@
package jnpf.service.impl;
import jnpf.entity.*;
import jnpf.mapper.ContractRelationMapper;
import jnpf.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.model.contractrelation.*;
import java.math.BigDecimal;
import cn.hutool.core.util.ObjectUtil;
import jnpf.permission.model.authorize.AuthorizeConditionModel;
import jnpf.util.GeneraterSwapUtil;
import jnpf.database.model.superQuery.SuperQueryJsonModel;
import jnpf.database.model.superQuery.ConditionJsonModel;
import jnpf.database.model.superQuery.SuperQueryConditionModel;
import java.lang.reflect.Field;
import com.baomidou.mybatisplus.annotation.TableField;
import java.util.regex.Pattern;
import jnpf.model.QueryModel;
import java.util.stream.Collectors;
import jnpf.base.model.ColumnDataModel;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import jnpf.database.model.superQuery.SuperJsonModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import java.text.SimpleDateFormat;
import jnpf.util.*;
import java.util.*;
import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity;
/**
*
* contractRelation
* V3.5
* https://www.jnpfsoft.com
* JNPF
* 2024-07-15
*/
@Service
public class ContractRelationServiceImpl extends ServiceImpl<ContractRelationMapper, ContractRelationEntity> implements ContractRelationService{
@Autowired
private GeneraterSwapUtil generaterSwapUtil;
@Autowired
private UserProvider userProvider;
@Override
public List<ContractRelationEntity> getList(ContractRelationPagination contractRelationPagination){
return getTypeList(contractRelationPagination,contractRelationPagination.getDataType());
}
/** 列表查询 */
@Override
public List<ContractRelationEntity> getTypeList(ContractRelationPagination contractRelationPagination,String dataType){
String userId=userProvider.get().getUserId();
List<String> AllIdList =new ArrayList();
List<List<String>> intersectionList =new ArrayList<>();
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc");
String columnData = !isPc ? ContractRelationConstant.getAppColumnData() : ContractRelationConstant.getColumnData();
ColumnDataModel columnDataModel = JsonUtil.getJsonToBean(columnData, ColumnDataModel.class);
String ruleJson = !isPc ? JsonUtil.getObjectToString(columnDataModel.getRuleListApp()) : JsonUtil.getObjectToString(columnDataModel.getRuleList());
int total=0;
int contractRelationNum =0;
QueryWrapper<ContractRelationEntity> contractRelationQueryWrapper=new QueryWrapper<>();
List<String> allSuperIDlist = new ArrayList<>();
String superOp ="";
if (ObjectUtil.isNotEmpty(contractRelationPagination.getSuperQueryJson())){
List<String> allSuperList = new ArrayList<>();
List<List<String>> intersectionSuperList = new ArrayList<>();
String queryJson = contractRelationPagination.getSuperQueryJson();
SuperJsonModel superJsonModel = JsonUtil.getJsonToBean(queryJson, SuperJsonModel.class);
int superNum = 0;
QueryWrapper<ContractRelationEntity> contractRelationSuperWrapper = new QueryWrapper<>();
contractRelationSuperWrapper = generaterSwapUtil.getCondition(new QueryModel(contractRelationSuperWrapper,ContractRelationEntity.class,queryJson,"0"));
int contractRelationNum1 = contractRelationSuperWrapper.getExpression().getNormal().size();
if (contractRelationNum1>0){
List<String> contractRelationList =this.list(contractRelationSuperWrapper).stream().map(ContractRelationEntity::getId).collect(Collectors.toList());
allSuperList.addAll(contractRelationList);
intersectionSuperList.add(contractRelationList);
superNum++;
}
superOp = superNum > 0 ? superJsonModel.getMatchLogic() : "";
//and or
if(superOp.equalsIgnoreCase("and")){
allSuperIDlist = generaterSwapUtil.getIntersection(intersectionSuperList);
}else{
allSuperIDlist = allSuperList;
}
}
List<String> allRuleIDlist = new ArrayList<>();
String ruleOp ="";
if (ObjectUtil.isNotEmpty(ruleJson)){
List<String> allRuleList = new ArrayList<>();
List<List<String>> intersectionRuleList = new ArrayList<>();
SuperJsonModel ruleJsonModel = JsonUtil.getJsonToBean(ruleJson, SuperJsonModel.class);
int ruleNum = 0;
QueryWrapper<ContractRelationEntity> contractRelationSuperWrapper = new QueryWrapper<>();
contractRelationSuperWrapper = generaterSwapUtil.getCondition(new QueryModel(contractRelationSuperWrapper,ContractRelationEntity.class,ruleJson,"0"));
int contractRelationNum1 = contractRelationSuperWrapper.getExpression().getNormal().size();
if (contractRelationNum1>0){
List<String> contractRelationList =this.list(contractRelationSuperWrapper).stream().map(ContractRelationEntity::getId).collect(Collectors.toList());
allRuleList.addAll(contractRelationList);
intersectionRuleList.add(contractRelationList);
ruleNum++;
}
ruleOp = ruleNum > 0 ? ruleJsonModel.getMatchLogic() : "";
//and or
if(ruleOp.equalsIgnoreCase("and")){
allRuleIDlist = generaterSwapUtil.getIntersection(intersectionRuleList);
}else{
allRuleIDlist = allRuleList;
}
}
boolean pcPermission = false;
boolean appPermission = false;
if(isPc && pcPermission){
if (!userProvider.get().getIsAdministrator()){
Object contractRelationObj=generaterSwapUtil.getAuthorizeCondition(new QueryModel(contractRelationQueryWrapper,ContractRelationEntity.class,contractRelationPagination.getMenuId(),"0"));
if (ObjectUtil.isEmpty(contractRelationObj)){
return new ArrayList<>();
} else {
contractRelationQueryWrapper = (QueryWrapper<ContractRelationEntity>)contractRelationObj;
if( contractRelationQueryWrapper.getExpression().getNormal().size()>0){
contractRelationNum++;
}
}
}
}
if(!isPc && appPermission){
if (!userProvider.get().getIsAdministrator()){
Object contractRelationObj=generaterSwapUtil.getAuthorizeCondition(new QueryModel(contractRelationQueryWrapper,ContractRelationEntity.class,contractRelationPagination.getMenuId(),"0"));
if (ObjectUtil.isEmpty(contractRelationObj)){
return new ArrayList<>();
} else {
contractRelationQueryWrapper = (QueryWrapper<ContractRelationEntity>)contractRelationObj;
if( contractRelationQueryWrapper.getExpression().getNormal().size()>0){
contractRelationNum++;
}
}
}
}
List<String> intersection = generaterSwapUtil.getIntersection(intersectionList);
if (total>0){
if (intersection.size()==0){
intersection.add("jnpfNullList");
}
contractRelationQueryWrapper.lambda().in(ContractRelationEntity::getId, intersection);
}
//是否有高级查询
if (StringUtil.isNotEmpty(superOp)){
if (allSuperIDlist.size()==0){
allSuperIDlist.add("jnpfNullList");
}
List<String> finalAllSuperIDlist = allSuperIDlist;
contractRelationQueryWrapper.lambda().and(t->t.in(ContractRelationEntity::getId, finalAllSuperIDlist));
}
//是否有数据过滤查询
if (StringUtil.isNotEmpty(ruleOp)){
if (allRuleIDlist.size()==0){
allRuleIDlist.add("jnpfNullList");
}
List<String> finalAllRuleIDlist = allRuleIDlist;
contractRelationQueryWrapper.lambda().and(t->t.in(ContractRelationEntity::getId, finalAllRuleIDlist));
}
//假删除标志
contractRelationQueryWrapper.lambda().isNull(ContractRelationEntity::getDeleteMark);
//排序
if(StringUtil.isEmpty(contractRelationPagination.getSidx())){
contractRelationQueryWrapper.lambda().orderByDesc(ContractRelationEntity::getId);
}else{
try {
String sidx = contractRelationPagination.getSidx();
String[] strs= sidx.split("_name");
ContractRelationEntity contractRelationEntity = new ContractRelationEntity();
Field declaredField = contractRelationEntity.getClass().getDeclaredField(strs[0]);
declaredField.setAccessible(true);
String value = declaredField.getAnnotation(TableField.class).value();
contractRelationQueryWrapper="asc".equals(contractRelationPagination.getSort().toLowerCase())?contractRelationQueryWrapper.orderByAsc(value):contractRelationQueryWrapper.orderByDesc(value);
} catch (NoSuchFieldException e) {
e.printStackTrace();
}
}
if("0".equals(dataType)){
if((total>0 && AllIdList.size()>0) || total==0){
Page<ContractRelationEntity> page=new Page<>(contractRelationPagination.getCurrentPage(), contractRelationPagination.getPageSize());
IPage<ContractRelationEntity> userIPage=this.page(page, contractRelationQueryWrapper);
return contractRelationPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{
List<ContractRelationEntity> list = new ArrayList();
return contractRelationPagination.setData(list, list.size());
}
}else{
return this.list(contractRelationQueryWrapper);
}
}
@Override
public ContractRelationEntity getInfo(String id){
QueryWrapper<ContractRelationEntity> queryWrapper=new QueryWrapper<>();
queryWrapper.lambda().eq(ContractRelationEntity::getId,id);
return this.getOne(queryWrapper);
}
@Override
public void create(ContractRelationEntity entity){
this.save(entity);
}
@Override
public boolean update(String id, ContractRelationEntity entity){
return this.updateById(entity);
}
@Override
public void delete(ContractRelationEntity entity){
if(entity!=null){
this.removeById(entity.getId());
}
}
/** 验证表单唯一字段,正则,非空 i-0新增-1修改*/
@Override
public String checkForm(ContractRelationForm form,int i) {
boolean isUp =StringUtil.isNotEmpty(form.getId()) && !form.getId().equals("0");
String id="";
String countRecover = "";
if (isUp){
id = form.getId();
}
//主表字段验证
return countRecover;
}
/**
* ()
* @param id
* @param contractRelationForm
* @return
*/
@Override
@Transactional
public void saveOrUpdate(ContractRelationForm contractRelationForm,String id, boolean isSave) throws Exception{
UserInfo userInfo=userProvider.get();
UserEntity userEntity = generaterSwapUtil.getUser(userInfo.getUserId());
contractRelationForm = JsonUtil.getJsonToBean(
generaterSwapUtil.swapDatetime(ContractRelationConstant.getFormData(),contractRelationForm),ContractRelationForm.class);
ContractRelationEntity entity = JsonUtil.getJsonToBean(contractRelationForm, ContractRelationEntity.class);
if(isSave){
String mainId = RandomUtil.uuId() ;
entity.setId(mainId);
entity.setVersion(0);
}else{
}
this.saveOrUpdate(entity);
}
}

@ -27,6 +27,7 @@ import jnpf.model.QueryModel;
import java.util.stream.Collectors;
import jnpf.base.model.ColumnDataModel;
import jnpf.util.wxutil.HttpUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import jnpf.database.model.superQuery.SuperJsonModel;
@ -893,6 +894,15 @@ public class CwsettlementServiceImpl extends ServiceImpl<CwsettlementMapper, Cws
entity.setId(mainId);
entity.setFlowId(cwsettlementForm.getFlowId());
entity.setVersion(0);
entity.setInvoiceNo(generaterSwapUtil.getBillNumber("fpbm", false));
// if (entity.getInvoiceNo()==null||entity.getInvoiceNo().equals("")){
// entity.setInvoiceNo(generaterSwapUtil.getBillNumber("fpbm", false));
// }
// if (entity.getAttribute11()==null||entity.getAttribute11().equals("")){
// entity.setAttribute11(generaterSwapUtil.getBillNumber("fpbm", false));
// }
}else{
// entity.setCreatorUserId(userInfo.getUserId());
// entity.setCreatorTime(DateUtil.getNowDate());
@ -1060,7 +1070,7 @@ public class CwsettlementServiceImpl extends ServiceImpl<CwsettlementMapper, Cws
//采购订单号
yunguanSaleSettlementProductModel.setORD_NO(cwsettlementsummaryModel.getBusinessCode());
//采购订单明细行
yunguanSaleSettlementProductModel.setORD_LN(Integer.parseInt(cwsettlementsummaryModel.getOrdLn()));
yunguanSaleSettlementProductModel.setORD_LN(Integer.valueOf(cwsettlementsummaryModel.getOrdLn()));
//采购入库单号
yunguanSaleSettlementProductModel.setRECEIPT_NO(cwsettlementsummaryModel.getDocmentNo());
yunguanSaleSettlementProductModel.setCONTRACT_NO(contractLEntity.getContractNumber());
@ -1087,8 +1097,19 @@ public class CwsettlementServiceImpl extends ServiceImpl<CwsettlementMapper, Cws
JSONObject purchaseCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/pur/actLine", "POST", JsonUtil.getObjectToString(yunguanSaleSettlementProductModelList));
if (ObjectUtil.isNotEmpty(purchaseCode)){
if (purchaseCode.get("code").equals("200")) {
cwsettlementEntity.setErpMark(purchaseCode.get("code").toString());
cwsettlementEntity.setErpMassage(purchaseCode.get("errmsg").toString());
cwsettlementMapper.updateById(cwsettlementEntity);
return true;
}else{
cwsettlementEntity.setErpMark(purchaseCode.get("code").toString());
cwsettlementEntity.setErpMassage(purchaseCode.get("errmsg").toString());
cwsettlementMapper.updateById(cwsettlementEntity);
}
}else{
cwsettlementEntity.setErpMark("N");
cwsettlementEntity.setErpMassage("ESB返回为空");
cwsettlementMapper.updateById(cwsettlementEntity);
}
return false;
}
@ -1112,11 +1133,11 @@ public class CwsettlementServiceImpl extends ServiceImpl<CwsettlementMapper, Cws
yunguanSaleSettlementModel.setACCOUNT_NO(cwsettlementEntity.getCode());
SubjectbasicEntity subjectbasicEntity = subjectbasicService.getById(cwsettlementEntity.getCwsettlementsubjectList().get(0).getSubjectId());
yunguanSaleSettlementModel.setVENDOR_CD(subjectbasicEntity.getCode());
yunguanSaleSettlementModel.setVENDOR_NAME(subjectbasicEntity.getName());
yunguanSaleSettlementModel.setVENDOR_NM(subjectbasicEntity.getName());
//供应商地点编码
yunguanSaleSettlementModel.setVENDOR_SITE_CODE(subjectbasicEntity.getReservedFields4());
yunguanSaleSettlementModel.setVENDOR_SITE_CODE(subjectbasicEntity.getReservedFields5());
//供应商地点名称
yunguanSaleSettlementModel.setATTRIBUTE10(subjectbasicEntity.getReservedFields5());
yunguanSaleSettlementModel.setATTRIBUTE10(subjectbasicEntity.getReservedFields4());
yunguanSaleSettlementModel.setATTRIBUTE2(contractLEntity.getContractNumber());
yunguanSaleSettlementModel.setATTRIBUTE4(contractLEntity.getContractNo());
yunguanSaleSettlementModel.setCREATE_EMP_ID(cwsettlementEntity.getCreatorUserId());
@ -1125,7 +1146,9 @@ public class CwsettlementServiceImpl extends ServiceImpl<CwsettlementMapper, Cws
yunguanSaleSettlementModel.setINVOICE_CNT(cwsettlementEntity.getInvoiceCnt());
yunguanSaleSettlementModel.setATTRIBUTE11(cwsettlementEntity.getAttribute11());
yunguanSaleSettlementModel.setINVOICE_DATE(cwsettlementEntity.getInvoiceDate());
yunguanSaleSettlementModel.setINVOICE_TYPE(cwsettlementEntity.getInvoiceType());
if (StringUtils.isNotEmpty(cwsettlementEntity.getInvoiceType())) {
yunguanSaleSettlementModel.setINVOICE_TYPE(cwsettlementEntity.getInvoiceType().equals("1") ? "CREDIT" : "STANDARD");
}
yunguanSaleSettlementModel.setINVOICE_NO(cwsettlementEntity.getInvoiceNo());
yunguanSaleSettlementModel.setINVOICE_CURRENCY("CNY");
yunguanSaleSettlementModel.setTAX_RATE_CODE("VAT_IN_" + cwsettlementEntity.getCwsettlementsummaryList().get(0).getRate());
@ -1157,11 +1180,23 @@ public class CwsettlementServiceImpl extends ServiceImpl<CwsettlementMapper, Cws
yunguanSaleSettlementModel.setESB_STATUS("N");
yunguanSaleSettlementModel.setESB_DTM(null);
yunguanSaleSettlementModel.setESB_MESSAGE("");
yunguanSaleSettlementModel.setLINE_SUM(cwsettlementEntity.getCwsettlementsummaryList().size());
JSONObject purchaseCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/pur/actHead", "POST", JsonUtil.getObjectToString(yunguanSaleSettlementModel));
if (ObjectUtil.isNotEmpty(purchaseCode)){
if (purchaseCode.get("code").equals("200")) {
cwsettlementEntity.setErpMark(purchaseCode.get("code").toString());
cwsettlementEntity.setErpMassage(purchaseCode.get("errmsg").toString());
cwsettlementMapper.updateById(cwsettlementEntity);
return true;
}else{
cwsettlementEntity.setErpMark(purchaseCode.get("code").toString());
cwsettlementEntity.setErpMassage(purchaseCode.get("errmsg").toString());
cwsettlementMapper.updateById(cwsettlementEntity);
}
}else{
cwsettlementEntity.setErpMark("N");
cwsettlementEntity.setErpMassage("ESB返回为空");
cwsettlementMapper.updateById(cwsettlementEntity);
}
return false;
}
@ -1193,7 +1228,7 @@ public class CwsettlementServiceImpl extends ServiceImpl<CwsettlementMapper, Cws
}else{
yunguanSaleSettlementProductModel.setINVOICE_TYPE("T");
}
yunguanSaleSettlementProductModel.setATTRIBUTE4(cwsettlementsummaryModel.getDocmentNo()+"-"+cwsettlementsummaryModel.getLineNo());
yunguanSaleSettlementProductModel.setATTRIBUTE4(cwsettlementsummaryModel.getDocmentNo()+"-"+String.format("%03d",Integer.valueOf(cwsettlementsummaryModel.getLineNo())));
//销售订单号
yunguanSaleSettlementProductModel.setORD_NO(cwsettlementsummaryModel.getBusinessCode());
//销售订单行号
@ -1202,7 +1237,7 @@ public class CwsettlementServiceImpl extends ServiceImpl<CwsettlementMapper, Cws
yunguanSaleSettlementProductModel.setDORD_NO(cwsettlementsummaryModel.getDocmentNo());
yunguanSaleSettlementProductModel.setCONTRACT_CD(contractLEntity.getContractNumber());
yunguanSaleSettlementProductModel.setKH_CONTR_NO(contractLEntity.getContractNo());
yunguanSaleSettlementProductModel.setCUST_ID(subjectbasicEntity.getId());
yunguanSaleSettlementProductModel.setCUST_ID(subjectbasicEntity.getCode());
yunguanSaleSettlementProductModel.setCUST_NAME(subjectbasicEntity.getName());
yunguanSaleSettlementProductModel.setITEM_NO(productWarehouseEntity.getCode());
yunguanSaleSettlementProductModel.setITEM_NM(productWarehouseEntity.getName());
@ -1248,8 +1283,19 @@ public class CwsettlementServiceImpl extends ServiceImpl<CwsettlementMapper, Cws
JSONObject purchaseCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/sal/invLine", "POST", JsonUtil.getObjectToString(yunguanSaleSettlementProductModelList));
if (ObjectUtil.isNotEmpty(purchaseCode)){
if (purchaseCode.get("code").equals("200")) {
cwsettlementEntity.setErpMark(purchaseCode.get("code").toString());
cwsettlementEntity.setErpMassage(purchaseCode.get("errmsg").toString());
cwsettlementMapper.updateById(cwsettlementEntity);
return true;
}else{
cwsettlementEntity.setErpMark(purchaseCode.get("code").toString());
cwsettlementEntity.setErpMassage(purchaseCode.get("errmsg").toString());
cwsettlementMapper.updateById(cwsettlementEntity);
}
}else{
cwsettlementEntity.setErpMark("N");
cwsettlementEntity.setErpMassage("ESB返回为空");
cwsettlementMapper.updateById(cwsettlementEntity);
}
return false;
}
@ -1325,8 +1371,19 @@ public class CwsettlementServiceImpl extends ServiceImpl<CwsettlementMapper, Cws
JSONObject purchaseCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/sal/invHead", "POST", JsonUtil.getObjectToString(yunguanSaleSettlementModel));
if (ObjectUtil.isNotEmpty(purchaseCode)){
if (purchaseCode.get("code").equals("200")) {
cwsettlementEntity.setErpMark(purchaseCode.get("code").toString());
cwsettlementEntity.setErpMassage(purchaseCode.get("errmsg").toString());
cwsettlementMapper.updateById(cwsettlementEntity);
return true;
}else{
cwsettlementEntity.setErpMark(purchaseCode.get("code").toString());
cwsettlementEntity.setErpMassage(purchaseCode.get("errmsg").toString());
cwsettlementMapper.updateById(cwsettlementEntity);
}
}else{
cwsettlementEntity.setErpMark("N");
cwsettlementEntity.setErpMassage("ESB返回为空");
cwsettlementMapper.updateById(cwsettlementEntity);
}
return false;
}

@ -1,7 +1,10 @@
package jnpf.service.impl;
import com.alibaba.fastjson.JSON;
import jnpf.entity.*;
import jnpf.mapper.InventoryMapper;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.service.OrganizeService;
import jnpf.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.model.inventory.*;
@ -47,6 +50,8 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
private UserProvider userProvider;
@Autowired
private InventoryMapper inventoryMapper;
@Autowired
private OrganizeService organizeService;
@Override
public List<InventoryEntity> getList(InventoryPagination inventoryPagination){
@ -252,8 +257,8 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
return inventoryPagination.setData(list, list.size());
}
}else{
return this.list(inventoryQueryWrapper);
}
// return this.list(inventoryQueryWrapper);
return inventoryMapper.queryExecl(inventoryQueryWrapper); }
}
@Override
public InventoryEntity getInfo(String id){
@ -316,4 +321,6 @@ public class InventoryServiceImpl extends ServiceImpl<InventoryMapper, Inventory
public List<InventoryEntity> queryByKeywordNotPage() {
return inventoryMapper.queryByKeywordNotPage();
}
}

@ -505,7 +505,10 @@ public class ReceiptOrderServiceImpl extends ServiceImpl<ReceiptOrderMapper, Rec
BusinessCargoEntity businessCargoEntity = businessCargoService.getById(entitys.getCargoId());
if (ObjectUtil.isNotEmpty(productWarehouseEntity) && productWarehouseEntity.getInventoryType().equals("1") && ObjectUtil.isNotEmpty(businessCargoEntity)){
entitys.setBatchNo(businessCargoEntity.getId());
}else {
}else if (ObjectUtil.isNotEmpty(productWarehouseEntity) && ObjectUtil.isNotEmpty(businessCargoEntity) && entity.getWarehouseId().equals("580435348526465093")){
entitys.setBatchNo(businessCargoEntity.getId());
}
else {
entitys.setBatchNo(generaterSwapUtil.getBillNumber("batch", false));
}
entitys.setProduceTime(DateUtil.getNowDate());

@ -297,6 +297,21 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
voucherQueryWrapper.like("a.voucher_code",value);
}
if(ObjectUtil.isNotEmpty(voucherPagination.getVehicleName())){
voucherNum++;
String value = String.valueOf(voucherPagination.getVehicleName());
voucherQueryWrapper.like("a.vehicle_name",value);
}
if(ObjectUtil.isNotEmpty(voucherPagination.getRemark1())){
voucherNum++;
String value = String.valueOf(voucherPagination.getRemark1());
voucherQueryWrapper.like("a.remark1",value);
}
if(ObjectUtil.isNotEmpty(voucherPagination.getPurchaseContractNo())){
voucherNum++;
voucherQueryWrapper.like("a.purchase_contract_no",voucherPagination.getPurchaseContractNo());
@ -1118,6 +1133,7 @@ public class VoucherServiceImpl extends ServiceImpl<VoucherMapper, VoucherEntity
voucherEntity.setVoucherPictures(model.getVoucherPictures());//凭证图片
voucherEntity.setPoundCode(model.getPoundCode());//磅单编号
voucherEntity.setVehicleName(model.getVehicleName());//车牌号
voucherEntity.setRemark1(model.getRemark1()); //备注
//承运方式
if(StringUtil.equals(model.getTransportationMethod(), "仓库承运(DC)")){
voucherEntity.setTransportationMethod("1");

@ -916,9 +916,13 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl<WarehousingOutbo
// if (yunguanSaleOutBoundModelList != null && yunguanSaleOutBoundModelList.size()>0) {
// JSONObject saleCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/sal/stoOurRecs", "POST", JsonUtil.getObjectToString(yunguanSaleOutBoundModelList));
// if (ObjectUtil.isNotEmpty(saleCode)){
// if (saleCode.get("code").equals("200")) {
// }
// entity.setErpMark(saleCode.get("code").toString());
// entity.setErpMassage(saleCode.get("errmsg").toString());
// }else {
// entity.setErpMark("N");
// entity.setErpMassage("ESB返回为空");
// }
// this.saveOrUpdate(entity);
// }
// }
}

@ -602,6 +602,16 @@ public class WarehousingStorageServiceImpl extends ServiceImpl<WarehousingStorag
} else {
entitys.setBatchNumber(generaterSwapUtil.getBillNumber("batch", false));
}
//根据商品id和批次号查询库存信息
QueryWrapper<InventoryEntity> inventoryQueryWrapper = new QueryWrapper<>();
inventoryQueryWrapper.lambda().eq(InventoryEntity::getWarehouseId, entity.getWarehouseId());
inventoryQueryWrapper.lambda().eq(InventoryEntity::getProductId, entitys.getProductId());
inventoryQueryWrapper.lambda().eq(InventoryEntity::getStorageAreaId, entitys.getWarehousingStorageId());
List<InventoryEntity> inventoryList = inventoryService.list(inventoryQueryWrapper);
if (inventoryList!=null&& inventoryList.size()>0){
entitys.setBatchNumber( inventoryList.get(0).getBatchNumber());
}
// entitys.setBatchNumber(generaterSwapUtil.getBillNumber("picihao", false));
entitys.setOrdLn(String.valueOf(line));
line++;
@ -805,10 +815,12 @@ public class WarehousingStorageServiceImpl extends ServiceImpl<WarehousingStorag
if(inventoryList != null && inventoryList.size() > 0){
inventoryEntity = inventoryList.get(0);
inventoryEntity.setInventoryNumber(inventoryEntity.getInventoryNumber().add((entitys.getDeliveryNum())));//库存数量
inventoryEntity.setSpec(entitys.getSpec());
}else{
inventoryEntity.setProductId(entitys.getProductId());
inventoryEntity.setCode(productWarehouseEntity.getCode());
inventoryEntity.setName(productWarehouseEntity.getName());
inventoryEntity.setSpec(entitys.getSpec());
inventoryEntity.setPhoto(productWarehouseEntity.getPhoto());
inventoryEntity.setBrandId(productWarehouseEntity.getBrandId());
inventoryEntity.setProductTypeId(productWarehouseEntity.getProductTypeId());
@ -956,9 +968,13 @@ public class WarehousingStorageServiceImpl extends ServiceImpl<WarehousingStorag
// if (yunguanPurchaseInBoundModelList != null && yunguanPurchaseInBoundModelList.size()>0) {
// JSONObject purchaseCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/pur/stoIn", "POST", JsonUtil.getObjectToString(yunguanPurchaseInBoundModelList));
// if (ObjectUtil.isNotEmpty(purchaseCode)){
// if (purchaseCode.get("code").equals("200")) {
// }
// entity.setErpMark(purchaseCode.get("code").toString());
// entity.setErpMassage(purchaseCode.get("errmsg").toString());
// }else{
// entity.setErpMark("N");
// entity.setErpMassage("ESB返回为空");
// }
// this.saveOrUpdate(entity);
// }
// }
}
@ -1157,7 +1173,6 @@ public class WarehousingStorageServiceImpl extends ServiceImpl<WarehousingStorag
organize = organize.replace("]","");
warehousingStorageQueryWrapper.like("a.organize_json_id",organize);
}
// warehousingStorageQueryWrapper.eq("a.yunguan_mark","Y");
warehousingStorageQueryWrapper.isNull("a.f_delete_mark");
IPage<WarehousingStorageEntity> userIPage;
if(StringUtil.equals(warehousingStoragePagination.getType(), "1")){

@ -644,10 +644,20 @@ public class BusinessOrderController {
// List<YunguanPurchaseOrderProductModel> purchaseOrderProduct = businessOrderService.queryPurchaseOrderProductByYunGuanInfo(id);
// JSONObject purchaseProductCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/pur/ordLine", "POST", JsonUtil.getObjectToString(purchaseOrderProduct));
// if(ObjectUtil.isNotEmpty(purchaseCode)){
// System.out.println(purchaseCode.toString());
// entity.setErpMark(purchaseProductCode.get("code").toString());
// entity.setErpMassage(purchaseProductCode.get("errmsg").toString());
// }else{
// entity.setErpMark("N");
// entity.setErpMassage("ESB返回为空");
// }
// }else {
// entity.setErpMark(purchaseCode.get("code").toString());
// entity.setErpMassage(purchaseCode.get("errmsg").toString());
// }
// }
// }else {
// entity.setErpMark("N");
// entity.setErpMassage("ESB返回为空");
// }
// }
// }else if (entity.getBusinessType().equals("2")){
// YunguanSaleOrderModel saleOrder = businessOrderService.querySaleOrderByYunGuanInfo(id);
@ -657,8 +667,20 @@ public class BusinessOrderController {
// if (saleCode.get("code").equals("200")) {
// List<YunguanSaleOrderProductModel> saleOrderProduct = businessOrderService.querySaleOrderProductByYunGuanInfo(id);
// JSONObject saleProductCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/sal/ordLine", "POST", JsonUtil.getObjectToString(saleOrderProduct));
// System.out.println(saleProductCode);
// if (ObjectUtil.isNotEmpty(saleProductCode)){
// entity.setErpMark(saleCode.get("code").toString());
// entity.setErpMassage(saleCode.get("errmsg").toString());
// }else{
// entity.setErpMark("N");
// entity.setErpMassage("ESB返回为空");
// }
// }else{
// entity.setErpMark(saleCode.get("code").toString());
// entity.setErpMassage(saleCode.get("errmsg").toString());
// }
// }else {
// entity.setErpMark("N");
// entity.setErpMassage("ESB返回为空");
// }
// }
// }
@ -832,7 +854,6 @@ public class BusinessOrderController {
businessOrderQueryWrapper.isNull("a.f_delete_mark");
businessOrderQueryWrapper.inSql("a.id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");//通过审核的订单
businessOrderQueryWrapper.like("a.organize_json_id",organize);
// businessOrderQueryWrapper.eq("a.yunguan_mark","Y");
List<BusinessOrderEntity> businessOrderEntityList = businessOrderService.saleOrderByDeliveryOrderInfo(businessOrderQueryWrapper);
// List<Map<String, Object>> realList=new ArrayList<>();
for (BusinessOrderEntity entity: businessOrderEntityList) {
@ -938,7 +959,6 @@ public class BusinessOrderController {
businessOrderQueryWrapper.isNull("a.f_delete_mark");
businessOrderQueryWrapper.inSql("a.id", "SELECT f_process_id FROM flow_task WHERE f_status = '2'");//通过审核的订单
businessOrderQueryWrapper.like("a.organize_json_id",organize);
// businessOrderQueryWrapper.eq("a.yunguan_mark","Y");
List<BusinessOrderEntity> businessOrderEntityList = businessOrderService.purchaseOrderByReceiptOrderInfo(businessOrderQueryWrapper);
// List<Map<String, Object>> realList=new ArrayList<>();
for (BusinessOrderEntity entity: businessOrderEntityList) {
@ -1158,6 +1178,20 @@ public class BusinessOrderController {
List<ContractLEntity> list= businessOrderService.querySaleContractInfo(businessLineId);
for (ContractLEntity entity : list){
List<ProductByContractModel> productByContractModelList = businessOrderService.queryProductByContractInfo(entity.getId());
if (entity.getIsLongAgreement().equals("1")){ //1是非长协
BigDecimal planSum =businessOrderService.queryBusinessContractSum(entity.getId());
if (entity.getContractNum()==null){
entity.setContractNum(BigDecimal.ZERO);
}
if (planSum==null){
planSum=BigDecimal.ZERO;
}
int comparisonResult = planSum.compareTo(entity.getContractNum());
if (comparisonResult!=-1){
entity.setIslang("1");
}
}
entity.setProductByContractModelList(productByContractModelList);
QueryWrapper<SubjectbasicEntity> subjectQueryWrapper = new QueryWrapper<>();
subjectQueryWrapper.lambda().eq(SubjectbasicEntity::getId,entity.getSubject());
@ -1179,6 +1213,20 @@ public class BusinessOrderController {
List<ContractLEntity> list= businessOrderService.queryPurchaseContractInfo(businessLineId);
for (ContractLEntity entity : list){
List<ProductByContractModel> productByContractModelList = businessOrderService.queryProductByContractInfo(entity.getId());
if (entity.getIsLongAgreement().equals("1")){ //1是非长协
BigDecimal planSum =businessOrderService.queryBusinessContractSum(entity.getId());
if (entity.getContractNum()==null){
entity.setContractNum(BigDecimal.ZERO);
}
if (planSum==null){
planSum=BigDecimal.ZERO;
}
int comparisonResult = planSum.compareTo(entity.getContractNum());
if (comparisonResult!=-1){
entity.setIslang("1");
}
}
entity.setProductByContractModelList(productByContractModelList);
QueryWrapper<SubjectbasicEntity> subjectQueryWrapper = new QueryWrapper<>();
subjectQueryWrapper.lambda().eq(SubjectbasicEntity::getId,entity.getSubject());
@ -1361,6 +1409,19 @@ public class BusinessOrderController {
businessOrderService.getPdfInfo(businessOrderEntity,response,token);
}
/**
*
*
* @param code
* @return
*/
@GetMapping(value = "/exportBusinessPdf/{code}/{token}", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public void exportBusinessInfo(HttpServletResponse response, @PathVariable("code") String code, @PathVariable("token")String token) throws Exception {
BusinessOrderEntity businessOrderEntity = new BusinessOrderEntity();
businessOrderEntity.setCode(code);
businessOrderService.getPdfBusinessInfo(businessOrderEntity,response,token);
}
/**
*
*
@ -1451,52 +1512,128 @@ public class BusinessOrderController {
if (type.equals("1")){ //采购订单接口
YunguanPurchaseOrderModel purchaseOrder = businessOrderService.queryPurchaseOrderByYunGuanInfo(id);
if (ObjectUtil.isNotEmpty(purchaseOrder)) {
BusinessOrderEntity businessOrderEntity = businessOrderService.getInfo(id);
JSONObject purchaseCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/pur/ordHead", "POST", JsonUtil.getObjectToString(purchaseOrder));
if (ObjectUtil.isNotEmpty(purchaseCode) && purchaseCode.get("code").equals("200")){
if (ObjectUtil.isNotEmpty(purchaseCode)){
if (purchaseCode.get("code").equals("200")){
List<YunguanPurchaseOrderProductModel> purchaseOrderProduct = businessOrderService.queryPurchaseOrderProductByYunGuanInfo(id);
JSONObject purchaseProductCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/pur/ordLine", "POST", JsonUtil.getObjectToString(purchaseOrderProduct));
if(ObjectUtil.isNotEmpty(purchaseProductCode) && purchaseProductCode.get("code").equals("200")){
return ActionResult.success("推送成功");
}else{
if (ObjectUtil.isNotEmpty(purchaseProductCode)) {
if (purchaseProductCode.get("code").equals("200")) {
businessOrderEntity.setErpMark(purchaseCode.get("code").toString());
businessOrderEntity.setErpMassage(purchaseCode.get("errmsg").toString());
businessOrderService.updateById(businessOrderEntity);
return ActionResult.success("推送成功");
}else{
businessOrderEntity.setErpMark(purchaseCode.get("code").toString());
businessOrderEntity.setErpMassage(purchaseCode.get("errmsg").toString());
businessOrderService.updateById(businessOrderEntity);
return ActionResult.success("推送采购订单行失败");
}
} else {
businessOrderEntity.setErpMark("N");
businessOrderEntity.setErpMassage("ESB返回为空");
businessOrderService.updateById(businessOrderEntity);
return ActionResult.fail("推送采购订单行失败");
}
}else{
businessOrderEntity.setErpMark(purchaseCode.get("code").toString());
businessOrderEntity.setErpMassage(purchaseCode.get("errmsg").toString());
businessOrderService.updateById(businessOrderEntity);
return ActionResult.fail("推送采购订单头失败");
}
}else{
businessOrderEntity.setErpMark("N");
businessOrderEntity.setErpMassage("ESB返回为空");
businessOrderService.updateById(businessOrderEntity);
return ActionResult.fail("推送采购订单头失败");
}
}
}else if (type.equals("2")){ //销售订单接口
YunguanSaleOrderModel saleOrder = businessOrderService.querySaleOrderByYunGuanInfo(id);
if (ObjectUtil.isNotEmpty(saleOrder)){
BusinessOrderEntity businessOrderEntity = businessOrderService.getInfo(id);
JSONObject saleCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/sal/ordHead", "POST", JsonUtil.getObjectToString(saleOrder));
if (ObjectUtil.isNotEmpty(saleCode) && saleCode.get("code").equals("200")) {
if (ObjectUtil.isNotEmpty(saleCode)) {
if (saleCode.get("code").equals("200")) {
List<YunguanSaleOrderProductModel> saleOrderProduct = businessOrderService.querySaleOrderProductByYunGuanInfo(id);
JSONObject saleProductCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/sal/ordLine", "POST", JsonUtil.getObjectToString(saleOrderProduct));
if (ObjectUtil.isNotEmpty(saleProductCode) && saleProductCode.get("code").equals("200")){
return ActionResult.success("推送成功");
}else{
if (ObjectUtil.isNotEmpty(saleProductCode)) {
if (saleProductCode.get("code").equals("200")) {
businessOrderEntity.setErpMark(saleCode.get("code").toString());
businessOrderEntity.setErpMassage(saleCode.get("errmsg").toString());
businessOrderService.updateById(businessOrderEntity);
return ActionResult.success("推送成功");
}else{
businessOrderEntity.setErpMark(saleCode.get("code").toString());
businessOrderEntity.setErpMassage(saleCode.get("errmsg").toString());
businessOrderService.updateById(businessOrderEntity);
return ActionResult.fail("推送销售订单行失败");
}
} else {
businessOrderEntity.setErpMark("N");
businessOrderEntity.setErpMassage("ESB返回为空");
businessOrderService.updateById(businessOrderEntity);
return ActionResult.fail("推送销售订单行失败");
}
}else{
businessOrderEntity.setErpMark(saleCode.get("code").toString());
businessOrderEntity.setErpMassage(saleCode.get("errmsg").toString());
businessOrderService.updateById(businessOrderEntity);
return ActionResult.fail("推送销售订单头失败");
}
}else{
businessOrderEntity.setErpMark("N");
businessOrderEntity.setErpMassage("ESB返回为空");
businessOrderService.updateById(businessOrderEntity);
return ActionResult.fail("推送销售订单头失败");
}
}
} else if (type.equals("3")) { //采购入库接口
List<YunguanPurchaseInBoundModel> yunguanPurchaseInBoundModelList = warehousingStorageService.purchaseInBoundByYunGuan(id);
if (yunguanPurchaseInBoundModelList != null && yunguanPurchaseInBoundModelList.size()>0) {
WarehousingStorageEntity warehousingStorageEntity = warehousingStorageService.getInfo(id);
JSONObject purchaseCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/pur/stoIn", "POST", JsonUtil.getObjectToString(yunguanPurchaseInBoundModelList));
if (ObjectUtil.isNotEmpty(purchaseCode) && purchaseCode.get("code").equals("200")){
return ActionResult.success("推送成功");
if (ObjectUtil.isNotEmpty(purchaseCode)){
if (purchaseCode.get("code").equals("200")) {
warehousingStorageEntity.setErpMark(purchaseCode.get("code").toString());
warehousingStorageEntity.setErpMassage(purchaseCode.get("errmsg").toString());
warehousingStorageService.updateById(warehousingStorageEntity);
return ActionResult.success("推送成功");
}else{
warehousingStorageEntity.setErpMark(purchaseCode.get("code").toString());
warehousingStorageEntity.setErpMassage(purchaseCode.get("errmsg").toString());
warehousingStorageService.updateById(warehousingStorageEntity);
return ActionResult.fail("推送失败");
}
}else{
warehousingStorageEntity.setErpMark("N");
warehousingStorageEntity.setErpMassage("ESB返回为空");
warehousingStorageService.updateById(warehousingStorageEntity);
return ActionResult.fail("推送失败");
}
}
} else if (type.equals("4")) { //销售出库接口
List<YunguanSaleOutBoundModel> yunguanSaleOutBoundModelList = warehousingOutboundService.saleOutBoundByYunGuan(id);
if (yunguanSaleOutBoundModelList != null && yunguanSaleOutBoundModelList.size()>0) {
WarehousingOutboundEntity warehousingOutboundEntity = warehousingOutboundService.getInfo(id);
JSONObject saleCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/sal/stoOurRecs", "POST", JsonUtil.getObjectToString(yunguanSaleOutBoundModelList));
if (ObjectUtil.isNotEmpty(saleCode) && saleCode.get("code").equals("200")){
return ActionResult.success("推送成功");
}else {
if (ObjectUtil.isNotEmpty(saleCode)){
if (saleCode.get("code").equals("200")) {
warehousingOutboundEntity.setErpMark(saleCode.get("code").toString());
warehousingOutboundEntity.setErpMassage(saleCode.get("errmsg").toString());
warehousingOutboundService.updateById(warehousingOutboundEntity);
return ActionResult.success("推送成功");
}else{
warehousingOutboundEntity.setErpMark(saleCode.get("code").toString());
warehousingOutboundEntity.setErpMassage(saleCode.get("errmsg").toString());
warehousingOutboundService.updateById(warehousingOutboundEntity);
return ActionResult.fail("推送失败");
}
}else{
warehousingOutboundEntity.setErpMark("N");
warehousingOutboundEntity.setErpMassage("ESB返回为空");
warehousingOutboundService.updateById(warehousingOutboundEntity);
return ActionResult.fail("推送失败");
}
}
@ -1504,10 +1641,24 @@ public class BusinessOrderController {
List<YunguanProductProcessModel> yunguanProductProcessModelList = workOrderService.queryWorkOrderProductByYunguan(id);
List<YunguanProductProcessModel> yunguanProductProcessModelList1 = workOrderService.queryWorkOrderPrimaryByYunguan(id);
yunguanProductProcessModelList.addAll(yunguanProductProcessModelList1);
WorkOrderEntity workOrderEntity = workOrderService.getInfo(id);
JSONObject workOrderCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/prod/proditem", "POST", JsonUtil.getObjectToString(yunguanProductProcessModelList));
if (ObjectUtil.isNotEmpty(workOrderCode) && workOrderCode.get("code").equals("200")){
return ActionResult.success("推送成功");
if (ObjectUtil.isNotEmpty(workOrderCode)){
if (workOrderCode.get("code").equals("200")) {
workOrderEntity.setErpMark(workOrderCode.get("code").toString());
workOrderEntity.setErpMassage(workOrderCode.get("errmsg").toString());
workOrderService.updateById(workOrderEntity);
return ActionResult.success("推送成功");
}else{
workOrderEntity.setErpMark(workOrderCode.get("code").toString());
workOrderEntity.setErpMassage(workOrderCode.get("errmsg").toString());
workOrderService.updateById(workOrderEntity);
return ActionResult.fail("推送失败");
}
}else{
workOrderEntity.setErpMark("N");
workOrderEntity.setErpMassage("ESB返回为空");
workOrderService.updateById(workOrderEntity);
return ActionResult.fail("推送失败");
}
} else if (type.equals("6")) { //采购结算接口
@ -1568,7 +1719,70 @@ public class BusinessOrderController {
}else {
return ActionResult.success("没有合同或者业务线");
}
}
/**
*
*
* @return
*/
@Operation(summary = "获取业务线合同")
@GetMapping("/getBusinessContractListSale")
public ActionResult businessContractListSale(@RequestParam("businessLine") String businessLine,@RequestParam("contractNumber") String contractNumber )throws IOException{
if (businessLine!=null && contractNumber!=null){
List<ContractLEntity> list= businessOrderService.queryBusinessContractSaleInfo(businessLine,contractNumber);
for (ContractLEntity entity : list){
List<ProductByContractModel> productByContractModelList = businessOrderService.queryProductByContractInfo(entity.getId());
entity.setProductByContractModelList(productByContractModelList);
QueryWrapper<SubjectbasicEntity> subjectQueryWrapper = new QueryWrapper<>();
subjectQueryWrapper.lambda().eq(SubjectbasicEntity::getId,entity.getSubject());
List<SubjectbasicEntity> subjectbasicEntityList = subjectbasicService.list(subjectQueryWrapper);
entity.setSubjectbasicEntityList(subjectbasicEntityList);
}
return ActionResult.success(list);
}else {
return ActionResult.success("没有合同或者业务线");
}
}
/**
*
*
* @return
*/
@Operation(summary = "根据业务线获取仓库")
@GetMapping("/getBusinessWarehousing")
public ActionResult businessWarehousing(@RequestParam("businessLine") String businessLine )throws IOException{
if (businessLine!=null){
UserInfo userInfo=userProvider.get();
OrganizeEntity organizeEntity = organizeService.getInfo(userInfo.getOrganizeId());
List<String> organizeJsonId = Arrays.stream(organizeEntity.getCompanyIdTree().split(",")).collect(Collectors.toList());
String organize = JSON.toJSONString(organizeJsonId);
organize = organize.replace("[","");
organize = organize.replace("]","");
// String deptId = JSON.toJSONString(organizeEntity.setF_id(););
QueryWrapper<BusinessLineEntity> businessLineQueryWrapper=new QueryWrapper<>();
businessLineQueryWrapper.lambda().eq(BusinessLineEntity::getParentId,businessLine);//状态为已入库
businessLineQueryWrapper.lambda().eq(BusinessLineEntity::getType,"517961431086269637");//状态为已入库
businessLineQueryWrapper.lambda().like(BusinessLineEntity::getOrganizeJsonId,organize);
businessLineQueryWrapper.lambda().like(BusinessLineEntity::getDepartmentId,organizeEntity.getF_id());
List<BusinessLineEntity> businessLineEntityList = businessLineService.list(businessLineQueryWrapper);
// String ware;
if (businessLineEntityList!=null && businessLineEntityList.size()>0){
// ware=businessLineEntityList.get(0).getId();
if (businessLineEntityList.size()>2){
businessLineEntityList=null;
}
}
return ActionResult.success(businessLineEntityList);
}else {
return ActionResult.success("没有合同或者业务线");
}
}
}

@ -644,4 +644,56 @@ public class ContractLController {
return ActionResult.success(contractLMap);
}
/**
* ()
* 使-
* @param id
* @return
*/
@Operation(summary = "信息")
@GetMapping("/relation/{id}")
public ActionResult relationInfo(@PathVariable("id") String id){
ContractLEntity entity= contractLService.getInfo(id);
if(entity==null){
return ActionResult.fail("表单数据不存在!");
}
Map<String, Object> contractLMap=JsonUtil.entityToMap(entity);
contractLMap.put("id", contractLMap.get("id"));
//副表数据
//子表数据
// List<ContractLPriceFormulaEntity> contractLPriceFormulaList = contractLService.getContractLPriceFormulaList(entity.getId());
// contractLMap.put("contractLPriceFormulaList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(contractLPriceFormulaList)));
// List<ContractLCommodityEntity> contractLCommodityList = contractLService.getContractLCommodityList(entity.getId());
// contractLMap.put("contractLCommodityList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(contractLCommodityList)));
// List<ContractLFeeClauseEntity> contractLFeeClauseList = contractLService.getContractLFeeClauseList(entity.getId());
// contractLMap.put("contractLFeeClauseList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(contractLFeeClauseList)));
// List<ContractLPaymentEntity> contractLPaymentList = contractLService.getContractLPaymentList(entity.getId());
// contractLMap.put("contractLPaymentList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(contractLPaymentList)));
List<ContractRelationEntity> contractRelationList = contractLService.getContractRelationList(entity.getId());
contractLMap.put("contractRelationList",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(contractRelationList)));
contractLMap = generaterSwapUtil.swapDataForm(contractLMap,ContractLConstant.getFormData(),ContractLConstant.TABLEFIELDKEY,ContractLConstant.TABLERENAMES);
return ActionResult.success(contractLMap);
}
/**
*
*
* @param contractLForm
* @return
*/
@PutMapping("/batch/{id}")
@Operation(summary = "更新")
public ActionResult update1(@PathVariable("id") String id,@RequestBody @Valid ContractLForm contractLForm,
@RequestParam(value = "isImport", required = false) boolean isImport){
try{
contractLService.saveOrUpdateContract(contractLForm, id ,false);
}catch(Exception e){
return ActionResult.fail("修改数据失败");
}
return ActionResult.success("修改成功");
}
}

@ -0,0 +1,191 @@
package jnpf.controller;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.exception.DataException;
import jnpf.permission.entity.UserEntity;
import jnpf.service.*;
import jnpf.entity.*;
import jnpf.util.*;
import jnpf.model.contractrelation.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.*;
import jnpf.annotation.JnpfField;
import jnpf.base.vo.PageListVO;
import jnpf.base.vo.PaginationVO;
import jnpf.base.vo.DownloadVO;
import jnpf.config.ConfigValueUtil;
import jnpf.base.entity.ProvinceEntity;
import java.io.IOException;
import java.util.stream.Collectors;
import jnpf.engine.entity.FlowTaskEntity;
import jnpf.exception.WorkFlowException;
import org.springframework.transaction.annotation.Transactional;
/**
* contractRelation
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-07-15
*/
@Slf4j
@RestController
@Tag(name = "contractRelation" , description = "scm")
@RequestMapping("/api/scm/ContractRelation")
public class ContractRelationController {
@Autowired
private GeneraterSwapUtil generaterSwapUtil;
@Autowired
private UserProvider userProvider;
@Autowired
private ContractRelationService contractRelationService;
/**
*
*
* @param contractRelationPagination
* @return
*/
@Operation(summary = "获取列表")
@PostMapping("/getList")
public ActionResult list(@RequestBody ContractRelationPagination contractRelationPagination)throws IOException{
List<ContractRelationEntity> list= contractRelationService.getList(contractRelationPagination);
List<Map<String, Object>> realList=new ArrayList<>();
for (ContractRelationEntity entity : list) {
Map<String, Object> contractRelationMap=JsonUtil.entityToMap(entity);
contractRelationMap.put("id", contractRelationMap.get("id"));
//副表数据
//子表数据
realList.add(contractRelationMap);
}
//数据转换
realList = generaterSwapUtil.swapDataList(realList, ContractRelationConstant.getFormData(), ContractRelationConstant.getColumnData(), contractRelationPagination.getModuleId(),false);
//返回对象
PageListVO vo = new PageListVO();
vo.setList(realList);
PaginationVO page = JsonUtil.getJsonToBean(contractRelationPagination, PaginationVO.class);
vo.setPagination(page);
return ActionResult.success(vo);
}
/**
*
*
* @param contractRelationForm
* @return
*/
@PostMapping()
@Operation(summary = "创建")
public ActionResult create(@RequestBody @Valid ContractRelationForm contractRelationForm) {
String b = contractRelationService.checkForm(contractRelationForm,0);
if (StringUtil.isNotEmpty(b)){
return ActionResult.fail(b );
}
try{
contractRelationService.saveOrUpdate(contractRelationForm, null ,true);
}catch(Exception e){
return ActionResult.fail("新增数据失败");
}
return ActionResult.success("创建成功");
}
/**
*
* @param id
* @param contractRelationForm
* @return
*/
@PutMapping("/{id}")
@Operation(summary = "更新")
public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid ContractRelationForm contractRelationForm,
@RequestParam(value = "isImport", required = false) boolean isImport){
contractRelationForm.setId(id);
if (!isImport) {
String b = contractRelationService.checkForm(contractRelationForm,1);
if (StringUtil.isNotEmpty(b)){
return ActionResult.fail(b );
}
}
ContractRelationEntity entity= contractRelationService.getInfo(id);
if(entity!=null){
try{
contractRelationService.saveOrUpdate(contractRelationForm,id,false);
}catch(Exception e){
return ActionResult.fail("修改数据失败");
}
return ActionResult.success("更新成功");
}else{
return ActionResult.fail("更新失败,数据不存在");
}
}
/**
*
* @param id
* @return
*/
@Operation(summary = "删除")
@DeleteMapping("/{id}")
@Transactional
public ActionResult delete(@PathVariable("id") String id){
ContractRelationEntity entity= contractRelationService.getInfo(id);
if(entity!=null){
//假删除
entity.setDeleteMark(1);
contractRelationService.update(id,entity);
}
return ActionResult.success("删除成功");
}
/**
* ()
* 使-
* @param id
* @return
*/
@Operation(summary = "表单信息(详情页)")
@GetMapping("/detail/{id}")
public ActionResult detailInfo(@PathVariable("id") String id){
ContractRelationEntity entity= contractRelationService.getInfo(id);
if(entity==null){
return ActionResult.fail("表单数据不存在!");
}
Map<String, Object> contractRelationMap=JsonUtil.entityToMap(entity);
contractRelationMap.put("id", contractRelationMap.get("id"));
//副表数据
//子表数据
contractRelationMap = generaterSwapUtil.swapDataDetail(contractRelationMap,ContractRelationConstant.getFormData(),"582532950638231493",false);
return ActionResult.success(contractRelationMap);
}
/**
* ()
* 使-
* @param id
* @return
*/
@Operation(summary = "信息")
@GetMapping("/{id}")
public ActionResult info(@PathVariable("id") String id){
ContractRelationEntity entity= contractRelationService.getInfo(id);
if(entity==null){
return ActionResult.fail("表单数据不存在!");
}
Map<String, Object> contractRelationMap=JsonUtil.entityToMap(entity);
contractRelationMap.put("id", contractRelationMap.get("id"));
//副表数据
//子表数据
contractRelationMap = generaterSwapUtil.swapDataForm(contractRelationMap,ContractRelationConstant.getFormData(),ContractRelationConstant.TABLEFIELDKEY,ContractRelationConstant.TABLERENAMES);
return ActionResult.success(contractRelationMap);
}
}

@ -1,13 +1,16 @@
package jnpf.controller;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.base.ActionResult;
import jnpf.base.UserInfo;
import jnpf.exception.DataException;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.entity.UserEntity;
import jnpf.permission.service.OrganizeService;
import jnpf.service.*;
import jnpf.entity.*;
import jnpf.util.*;
@ -79,6 +82,8 @@ public class InventoryController {
private WarehousingReceiveService warehousingReceiveService;
@Autowired
private ConfigValueUtil configValueUtil;
@Autowired
private OrganizeService organizeService;
/**
*
@ -173,6 +178,10 @@ public class InventoryController {
return ActionResult.fail("请选择导出字段");
}
List<InventoryEntity> list= inventoryService.getList(inventoryPagination);
// List<InventoryEntity> list = inventoryService.getExeclList(inventoryPagination);
List<Map<String, Object>> realList=new ArrayList<>();
for (InventoryEntity entity : list) {
Map<String, Object> inventoryMap=JsonUtil.entityToMap(entity);

@ -380,11 +380,23 @@ public class VoucherController {
entitys.add(new ExcelExportEntity("关联单据号" ,"associatedDocumentNo"));
break;
case "saleAmount" :
entitys.add(new ExcelExportEntity("销售额" ,"saleAmount"));
break;
entitys.add(new ExcelExportEntity("销售额" ,"saleAmount"));
break;
case "orderNo" :
entitys.add(new ExcelExportEntity("订单序号" ,"orderNo"));
break;
case "productName" :
entitys.add(new ExcelExportEntity("物料名称" ,"productName"));
break;
case "productCode" :
entitys.add(new ExcelExportEntity("物料编码" ,"productCode"));
break;
case "saleContractNo" :
entitys.add(new ExcelExportEntity("销售合同" ,"saleContractNo"));
break;
case "customerName1" :
entitys.add(new ExcelExportEntity("客户" ,"customerName1"));
break;
case "tableField111-productId":
tableField111List.add(new ExcelExportEntity("商品名称" ,"productId"));
break;

@ -532,38 +532,7 @@ public class WarehousingStorageController {
flowTaskNodeEntityQueryWrapper.lambda().eq(FlowTaskNodeEntity::getTaskId, flowTaskEntity.getId());
List<FlowTaskNodeEntity> flowTaskNodeEntityList = flowTaskNodeService.list(flowTaskNodeEntityQueryWrapper);
if (flowTaskNodeEntityList != null && flowTaskNodeEntityList.size() > 0 && "end".equals(flowTaskNodeEntityList.get(0).getNodeNext())) {
// if (warehousingNotificationEntity!=null){
// BigDecimal maxNum = BigDecimal.ZERO;
// BigDecimal YNum = BigDecimal.ZERO;
// BigDecimal netWeightNum = BigDecimal.ZERO;
// for (WarehousingStorageProductModel warehousingStorageProductModel : warehousingStorageForm.getWarehousingStorageProductList()) {
// maxNum = maxNum.add( new BigDecimal(warehousingStorageProductModel.getStorageNumber())) ;//这次的入库数量
// if (warehousingStorageProductModel.getReceivedQuantity()!=null){
// maxNum = maxNum.add( new BigDecimal(warehousingStorageProductModel.getReceivedQuantity())) ;
// }else {
// maxNum = maxNum.add( new BigDecimal(0)) ;
// }
//
// }
// for (WarehousingStoragePoundlistModel warehousingStoragePoundlistModel : warehousingStorageForm.getWarehousingStoragePoundlistList()) {
// netWeightNum = netWeightNum.add( warehousingStoragePoundlistModel.getNetWeight()) ;
// }
// BigDecimal netWeightNumNot= netWeightNum; //这次的入库数量
// if (warehousingNotificationEntity.getConfirmWarehousingNum()!=null){
// YNum.add(new BigDecimal (warehousingNotificationEntity.getConfirmWarehousingNum()));
// }
// BigDecimal maxNums = maxNum; //暂存
// BigDecimal result = maxNum.subtract(YNum); //
// result = result.subtract(netWeightNum); //最后结果
//
//
//
// if (result.compareTo(BigDecimal.ZERO)==0){
// warehousingNotificationEntity.setWarehousingStatus("4");
// }else {
// warehousingNotificationEntity.setWarehousingStatus("3");
//// warehousingNotificationEntity.setNotificationStorageNumber();
// }
//上面注释是多次入库,现在先弄成一次性入库
//审核通过修改入库通知
WarehousingNotificationEntity warehousingNotificationEntity = warehousingNotificationService.getInfo(warehousingStorageForm.getWarehousingId());
@ -668,9 +637,11 @@ public class WarehousingStorageController {
if(inventoryList != null && inventoryList.size() > 0){
inventoryEntity = inventoryList.get(0);
inventoryEntity.setInventoryNumber(inventoryEntity.getInventoryNumber().add(new BigDecimal(warehousingStorageProductModel.getStorageNumber())));//库存数量
inventoryEntity.setSpec(warehousingStorageProductModel.getSpec());
}else{
inventoryEntity.setProductId(warehousingStorageProductModel.getProductId());
inventoryEntity.setCode(productWarehouseEntity.getCode());
inventoryEntity.setSpec(warehousingStorageProductModel.getSpec());
inventoryEntity.setName(productWarehouseEntity.getName());
inventoryEntity.setPhoto(productWarehouseEntity.getPhoto());
inventoryEntity.setBrandId(productWarehouseEntity.getBrandId());

@ -800,8 +800,14 @@ public class WorkOrderController {
// List<YunguanProductProcessModel> yunguanProductProcessModelList1 = workOrderService.queryWorkOrderPrimaryByYunguan(id);
// yunguanProductProcessModelList.addAll(yunguanProductProcessModelList1);
// JSONObject workOrderCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/prod/proditem", "POST", JsonUtil.getObjectToString(yunguanProductProcessModelList));
// if (ObjectUtil.isNotEmpty(workOrderCode) && workOrderCode.get("code").equals("200")){
// if(ObjectUtil.isNotEmpty(workOrderCode)){
// entity.setErpMark(workOrderCode.get("code").toString());
// entity.setErpMassage(workOrderCode.get("errmsg").toString());
// }else {
// entity.setErpMark("N");
// entity.setErpMassage("ESB返回为空");
// }
workOrderService.updateById(entity);
}
}

@ -15,9 +15,13 @@ import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.service.OrganizeService;
import jnpf.service.*;
import jnpf.util.JsonUtil;
import jnpf.util.RedisUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.cache.CacheProperties;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
import org.springframework.web.bind.annotation.*;
import javax.servlet.ServletInputStream;
@ -28,6 +32,7 @@ import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
* Inventory
@ -82,6 +87,8 @@ public class YunguanInterfaceController {
private WorkOrderPrimaryService workOrderPrimaryService;
@Autowired
private WorkOrderProductService workOrderProductService;
@Autowired
private RedisUtil redisUtil;
/**
*
*
@ -120,10 +127,16 @@ public class YunguanInterfaceController {
queryWrapper.lambda().eq(OrganizeEntity::getEnCode, ObjectUtil.isEmpty(jsonObject.get("ATTR3")) ? null : jsonObject.get("ATTR3").toString());
List<OrganizeEntity> orgList = organizeService.list(queryWrapper);
if(orgList != null && orgList.size() > 0){
List<String> conpanyIdList = Arrays.asList(orgList.get(0).getCompanyIdTree().split(","));
List<String> conpanyIdList = Arrays.asList(orgList.get(0).getOrganizeIdTree().split(","));
String organizeId = JSON.toJSONString(conpanyIdList);
entity.setOrganizeJsonId(organizeId);//分支机构编码
}
QueryWrapper<OrganizeEntity> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.lambda().eq(OrganizeEntity::getEnCode, ObjectUtil.isEmpty(jsonObject.get("ATTR1")) ? null : jsonObject.get("ATTR1").toString());
List<OrganizeEntity> companyId = organizeService.list(queryWrapper);
if (companyId != null && companyId.size() > 0) {
entity.setCompanyId(companyId.get(0).getId());//公司id
}
entity.setReservedFields1(ObjectUtil.isEmpty(jsonObject.get("ACCOUNT_TYPE")) ? null : jsonObject.get("ACCOUNT_TYPE").toString());//账户类型
entity.setReservedFields2(ObjectUtil.isEmpty(jsonObject.get("CLIENT_CLASSIFY")) ? null : jsonObject.get("CLIENT_CLASSIFY").toString());//客户类型
entity.setCountry(ObjectUtil.isEmpty(jsonObject.get("COUNTRY")) ? null : jsonObject.get("COUNTRY").toString());//国家
@ -149,6 +162,7 @@ public class YunguanInterfaceController {
}else {
//新增客户
SubjectbasicEntity subjectbasicEntity = new SubjectbasicEntity();
subjectbasicEntity.setCollaborationMethod("1");
subjectbasicEntity.setId(ObjectUtil.isEmpty(jsonObject.get("ID")) ? null : jsonObject.get("ID").toString());//ID
subjectbasicEntity.setName(ObjectUtil.isEmpty(jsonObject.get("CUST_FULL_NAME")) ? null : jsonObject.get("CUST_FULL_NAME").toString());//名称
subjectbasicEntity.setCalssify("1");//一级
@ -167,10 +181,16 @@ public class YunguanInterfaceController {
queryWrapper.lambda().eq(OrganizeEntity::getEnCode, ObjectUtil.isEmpty(jsonObject.get("ATTR3")) ? null : jsonObject.get("ATTR3").toString());
List<OrganizeEntity> orgList = organizeService.list(queryWrapper);
if (orgList != null && orgList.size() > 0) {
List<String> conpanyIdList = Arrays.asList(orgList.get(0).getCompanyIdTree().split(","));
List<String> conpanyIdList = Arrays.asList(orgList.get(0).getOrganizeIdTree().split(","));
String organizeId = JSON.toJSONString(conpanyIdList);
subjectbasicEntity.setOrganizeJsonId(organizeId);//分支机构编码
}
QueryWrapper<OrganizeEntity> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.lambda().eq(OrganizeEntity::getEnCode, ObjectUtil.isEmpty(jsonObject.get("ATTR1")) ? null : jsonObject.get("ATTR1").toString());
List<OrganizeEntity> companyId = organizeService.list(queryWrapper);
if (companyId != null && companyId.size() > 0) {
subjectbasicEntity.setCompanyId(companyId.get(0).getId());//公司id
}
subjectbasicEntity.setReservedFields1(ObjectUtil.isEmpty(jsonObject.get("ACCOUNT_TYPE")) ? null : jsonObject.get("ACCOUNT_TYPE").toString());//账户类型
subjectbasicEntity.setReservedFields2(ObjectUtil.isEmpty(jsonObject.get("CLIENT_CLASSIFY")) ? null : jsonObject.get("CLIENT_CLASSIFY").toString());//客户类型
if (ObjectUtil.isNotEmpty(jsonObject.get("COUNTRY"))){
@ -239,9 +259,10 @@ public class YunguanInterfaceController {
queryWrapper.lambda().eq(OrganizeEntity::getEnCode, ObjectUtil.isEmpty(jsonObject.get("ORG_ID")) ? null : jsonObject.get("ORG_ID").toString());
List<OrganizeEntity> orgList = organizeService.list(queryWrapper);
if(orgList != null && orgList.size() > 0){
List<String> conpanyIdList = Arrays.asList(orgList.get(0).getCompanyIdTree().split(","));
List<String> conpanyIdList = Arrays.asList(orgList.get(0).getOrganizeIdTree().split(","));
String organizeId = JSON.toJSONString(conpanyIdList);
entity.setOrganizeJsonId(organizeId);//分支机构编码
entity.setCompanyId(orgList.get(0).getId());//公司id
}
entity.setReservedFields2(ObjectUtil.isEmpty(jsonObject.get("VENDOR_TYPE")) ? null : jsonObject.get("VENDOR_TYPE").toString());
entity.setCountry(ObjectUtil.isEmpty(jsonObject.get("COUNTRY")) ? null : jsonObject.get("COUNTRY").toString());//国家
@ -265,6 +286,7 @@ public class YunguanInterfaceController {
}else {
//新增供应商
SubjectbasicEntity subjectbasicEntity = new SubjectbasicEntity();
subjectbasicEntity.setCollaborationMethod("1");
subjectbasicEntity.setId(ObjectUtil.isEmpty(jsonObject.get("ID")) ? null : jsonObject.get("ID").toString());//ID
subjectbasicEntity.setName(ObjectUtil.isEmpty(jsonObject.get("VENDOR_NAME")) ? null : jsonObject.get("VENDOR_NAME").toString());//名称
subjectbasicEntity.setCalssify("1");//一级
@ -283,9 +305,10 @@ public class YunguanInterfaceController {
queryWrapper.lambda().eq(OrganizeEntity::getEnCode, ObjectUtil.isEmpty(jsonObject.get("ORG_ID")) ? null : jsonObject.get("ORG_ID").toString());
List<OrganizeEntity> orgList = organizeService.list(queryWrapper);
if (orgList != null && orgList.size() > 0) {
List<String> conpanyIdList = Arrays.asList(orgList.get(0).getCompanyIdTree().split(","));
List<String> conpanyIdList = Arrays.asList(orgList.get(0).getOrganizeIdTree().split(","));
String organizeId = JSON.toJSONString(conpanyIdList);
subjectbasicEntity.setOrganizeJsonId(organizeId);//分支机构编码
entity.setCompanyId(orgList.get(0).getId());//公司id
}
subjectbasicEntity.setReservedFields2(ObjectUtil.isEmpty(jsonObject.get("VENDOR_TYPE")) ? null : jsonObject.get("VENDOR_TYPE").toString());//供应商类型
if (ObjectUtil.isNotEmpty(jsonObject.get("COUNTRY"))){
@ -344,10 +367,13 @@ public class YunguanInterfaceController {
//库存组织编码,库存组织名称
if(ObjectUtil.isNotEmpty(jsonObject.get("ORG_CD"))){
contractLEntity.setKucunOrgCode(jsonObject.get("ORG_CD").toString());
DictionaryyunguandataEntity dictionaryyunguandataEntity = dictionaryyunguandataService.getDateValueInfo("564773000885326917",contractLEntity.getKucunOrgCode());
if (ObjectUtil.isNotEmpty(dictionaryyunguandataEntity)) {
contractLEntity.setKucunOrgName(dictionaryyunguandataEntity.getZhihuiValue());
}
// DictionaryyunguandataEntity dictionaryyunguandataEntity = dictionaryyunguandataService.getDateValueInfo("564773000885326917",contractLEntity.getKucunOrgCode());
// if (ObjectUtil.isNotEmpty(dictionaryyunguandataEntity)) {
// contractLEntity.setKucunOrgName(dictionaryyunguandataEntity.getZhihuiValue());
// }
}
if (ObjectUtil.isNotEmpty(jsonObject.get("ORG_NM"))){
contractLEntity.setKucunOrgName(jsonObject.get("ORG_NM").toString());
}
//组织,公司,部门,签约主体
if(ObjectUtil.isNotEmpty(jsonObject.get("DEPT_CD"))){
@ -355,7 +381,7 @@ public class YunguanInterfaceController {
queryWrapper.lambda().eq(OrganizeEntity::getEnCode, jsonObject.get("DEPT_CD").toString());
List<OrganizeEntity> orgList = organizeService.list(queryWrapper);
if(orgList != null && orgList.size() > 0){
List<String> conpanyIdList = Arrays.asList(orgList.get(0).getCompanyIdTree().split(","));
List<String> conpanyIdList = Arrays.asList(orgList.get(0).getOrganizeIdTree().split(","));
String organizeId = JSON.toJSONString(conpanyIdList);
contractLEntity.setDepartmentId(orgList.get(0).getId());
contractLEntity.setCompanyId(orgList.get(0).getParentId());
@ -730,10 +756,32 @@ public class YunguanInterfaceController {
System.out.println(str);
YunguanSaleCollectionModel yunguanSaleCollectionModel = JsonUtil.getJsonToBean(str, YunguanSaleCollectionModel.class);
CwSaleCollectionEntity cwSaleCollectionEntity = new CwSaleCollectionEntity();
cwSaleCollectionEntity.setId(yunguanSaleCollectionModel.getID()); //收款单号
cwSaleCollectionEntity.setCompCd(yunguanSaleCollectionModel.getCOMP_CD()); //付款方
cwSaleCollectionEntity.setOrgId(yunguanSaleCollectionModel.getORG_ID()); //收款金额
cwSaleCollectionEntity.setDepartmentCd(yunguanSaleCollectionModel.getDEPARTMENT_CD()); //收款时间
cwSaleCollectionEntity.setId(yunguanSaleCollectionModel.getID()); //ID
if (StringUtils.isNotEmpty(yunguanSaleCollectionModel.getCOMP_CD())) {
cwSaleCollectionEntity.setCompCd(yunguanSaleCollectionModel.getCOMP_CD());
QueryWrapper<OrganizeEntity> organizeQueryWrapper = new QueryWrapper<>();
organizeQueryWrapper.lambda().eq(OrganizeEntity::getEnCode,yunguanSaleCollectionModel.getCOMP_CD());
organizeQueryWrapper.lambda().eq(OrganizeEntity::getEnabledMark,"1");
organizeQueryWrapper.lambda().isNull(OrganizeEntity::getDeleteMark);
OrganizeEntity organizeEntity = organizeService.getOne(organizeQueryWrapper);
if (ObjectUtil.isNotEmpty(organizeEntity)){
cwSaleCollectionEntity.setCompanyId(organizeEntity.getId()); //公司id
}
}
cwSaleCollectionEntity.setOrgId(yunguanSaleCollectionModel.getORG_ID());
if (StringUtils.isNotEmpty(yunguanSaleCollectionModel.getDEPARTMENT_CD())) {
cwSaleCollectionEntity.setDepartmentCd(yunguanSaleCollectionModel.getDEPARTMENT_CD());
QueryWrapper<OrganizeEntity> deptQueryWrapper = new QueryWrapper<>();
deptQueryWrapper.lambda().eq(OrganizeEntity::getEnCode,yunguanSaleCollectionModel.getDEPARTMENT_CD());
deptQueryWrapper.lambda().eq(OrganizeEntity::getEnabledMark,"1");
deptQueryWrapper.lambda().isNull(OrganizeEntity::getDeleteMark);
OrganizeEntity organizeEntity = organizeService.getOne(deptQueryWrapper);
if (ObjectUtil.isNotEmpty(organizeEntity)){
cwSaleCollectionEntity.setDepartmentId(organizeEntity.getId()); //部门id
List<String> strList = Arrays.asList(organizeEntity.getOrganizeIdTree().split(","));
cwSaleCollectionEntity.setOrganizeJsonId(JSON.toJSONString(strList)); //组织id
}
}
cwSaleCollectionEntity.setPrepaymentNo(yunguanSaleCollectionModel.getPREPAYMENT_NO()); //收款方式
cwSaleCollectionEntity.setPrepaymentSts(yunguanSaleCollectionModel.getPREPAYMENT_STS()); //备注
cwSaleCollectionEntity.setCustCode(yunguanSaleCollectionModel.getCUST_CODE()); //制单人
@ -792,20 +840,49 @@ public class YunguanInterfaceController {
String str = new String(bytes, StandardCharsets.UTF_8);
JSONObject jsonObject = JSONObject.parseObject(str);
if (ObjectUtil.isNotEmpty(jsonObject)){
if (jsonObject.get("type").equals("采购订单头")){
if (jsonObject.get("TYPE").equals("采购订单头")){
YunguanPurchaseOrderModel yunguanPurchaseOrderModel = JsonUtil.getJsonToBean(str,YunguanPurchaseOrderModel.class);
if (StringUtils.isNotEmpty(yunguanPurchaseOrderModel.getORD_NO())){
QueryWrapper<BusinessOrderEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BusinessOrderEntity::getCode,yunguanPurchaseOrderModel.getORD_NO());
BusinessOrderEntity businessOrderEntity = businessOrderService.getOne(queryWrapper);
if (ObjectUtil.isNotEmpty(businessOrderEntity)){
if (ObjectUtil.isNotEmpty(businessOrderEntity) && yunguanPurchaseOrderModel.getREAD_FLAG().equals("N")){
businessOrderEntity.setYunguanMark(yunguanPurchaseOrderModel.getREAD_FLAG());
businessOrderEntity.setYunguanTime(yunguanPurchaseOrderModel.getREAD_TIME());
businessOrderEntity.setYunguanMassage(yunguanPurchaseOrderModel.getERR_MESSAGE());
businessOrderService.updateById(businessOrderEntity);
}
//更新运管标志
String purchaseNo = yunguanPurchaseOrderModel.getORD_NO();
boolean inBoundNoExists = redisUtil.exists(purchaseNo);
if (inBoundNoExists){
QueryWrapper<BusinessOrderProductRelationalEntity> countQueryWrapper = new QueryWrapper<>();
countQueryWrapper.lambda().eq(BusinessOrderProductRelationalEntity::getBusinessOrderId,businessOrderEntity.getId());
countQueryWrapper.lambda().isNull(BusinessOrderProductRelationalEntity::getDeleteMark);
long count = businessOrderProductRelationalService.count(countQueryWrapper);
count++;
long size = redisUtil.getListSize(purchaseNo);
List<Object> objList = redisUtil.get(purchaseNo,0,size);
List<String> list = objList.stream().map(Object::toString).collect(Collectors.toList());
list.add(yunguanPurchaseOrderModel.getREAD_FLAG());
redisUtil.remove(purchaseNo);
redisUtil.insert(purchaseNo,list);
if (list.size() == count){
boolean dis = list.stream().distinct().count() <= 1;
if (dis){
businessOrderEntity.setYunguanMark(yunguanPurchaseOrderModel.getREAD_FLAG());
businessOrderEntity.setYunguanTime(yunguanPurchaseOrderModel.getREAD_TIME());
businessOrderEntity.setYunguanMassage(yunguanPurchaseOrderModel.getERR_MESSAGE());
businessOrderService.updateById(businessOrderEntity);
}
redisUtil.remove(purchaseNo);
}
}else {
List<String> list = new ArrayList<>(Collections.singleton(yunguanPurchaseOrderModel.getREAD_FLAG()));
redisUtil.insert(purchaseNo, list);
}
}
} else if (jsonObject.get("type").equals("采购订单行")) {
} else if (jsonObject.get("TYPE").equals("采购订单行")) {
YunguanPurchaseOrderProductModel yunguanPurchaseOrderProductModel = JsonUtil.getJsonToBean(str,YunguanPurchaseOrderProductModel.class);
if (StringUtils.isNotEmpty(yunguanPurchaseOrderProductModel.getORD_NO())){
QueryWrapper<BusinessOrderEntity> queryWrapper = new QueryWrapper<>();
@ -822,22 +899,86 @@ public class YunguanInterfaceController {
businessOrderProductRelationalEntity.setYunguanMassage(yunguanPurchaseOrderProductModel.getERR_MESSAGE());
businessOrderProductRelationalService.updateById(businessOrderProductRelationalEntity);
}
if (yunguanPurchaseOrderProductModel.getREAD_FLAG().equals("N")){
businessOrderEntity.setYunguanMark(yunguanPurchaseOrderProductModel.getREAD_FLAG());
businessOrderEntity.setYunguanTime(yunguanPurchaseOrderProductModel.getREAD_TIME());
businessOrderEntity.setYunguanMassage(yunguanPurchaseOrderProductModel.getERR_MESSAGE());
businessOrderService.updateById(businessOrderEntity);
}
//更新运管标志
String purchaseNo = yunguanPurchaseOrderProductModel.getORD_NO();
boolean inBoundNoExists = redisUtil.exists(purchaseNo);
if (inBoundNoExists){
QueryWrapper<BusinessOrderProductRelationalEntity> countQueryWrapper = new QueryWrapper<>();
countQueryWrapper.lambda().eq(BusinessOrderProductRelationalEntity::getBusinessOrderId,businessOrderEntity.getId());
countQueryWrapper.lambda().isNull(BusinessOrderProductRelationalEntity::getDeleteMark);
long count = businessOrderProductRelationalService.count(countQueryWrapper);
count++;
long size = redisUtil.getListSize(purchaseNo);
List<Object> objList = redisUtil.get(purchaseNo,0,size);
List<String> list = objList.stream().map(Object::toString).collect(Collectors.toList());
list.add(yunguanPurchaseOrderProductModel.getREAD_FLAG());
redisUtil.remove(purchaseNo);
redisUtil.insert(purchaseNo,list);
if (list.size() == count){
boolean dis = list.stream().distinct().count() <= 1;
if (dis){
businessOrderEntity.setYunguanMark(yunguanPurchaseOrderProductModel.getREAD_FLAG());
businessOrderEntity.setYunguanTime(yunguanPurchaseOrderProductModel.getREAD_TIME());
businessOrderEntity.setYunguanMassage(yunguanPurchaseOrderProductModel.getERR_MESSAGE());
businessOrderService.updateById(businessOrderEntity);
}
redisUtil.remove(purchaseNo);
}
}else {
List<String> list = new ArrayList<>(Collections.singleton(yunguanPurchaseOrderProductModel.getREAD_FLAG()));
redisUtil.insert(purchaseNo, list);
}
}
}
} else if (jsonObject.get("type").equals("销售订单头")) {
} else if (jsonObject.get("TYPE").equals("销售订单头")) {
YunguanSaleOrderModel yunguanSaleOrderModel = JsonUtil.getJsonToBean(str,YunguanSaleOrderModel.class);
if (StringUtils.isNotEmpty(yunguanSaleOrderModel.getORD_NO())){
QueryWrapper<BusinessOrderEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(BusinessOrderEntity::getCode,yunguanSaleOrderModel.getORD_NO());
BusinessOrderEntity businessOrderEntity = businessOrderService.getOne(queryWrapper);
if (ObjectUtil.isNotEmpty(businessOrderEntity)){
if (ObjectUtil.isNotEmpty(businessOrderEntity) && yunguanSaleOrderModel.getREAD_FLAG().equals("N")){
businessOrderEntity.setYunguanMark(yunguanSaleOrderModel.getREAD_FLAG());
businessOrderEntity.setYunguanTime(yunguanSaleOrderModel.getREAD_TIME());
businessOrderEntity.setYunguanMassage(yunguanSaleOrderModel.getERR_MESSAGE());
businessOrderService.updateById(businessOrderEntity);
}
//更新运管标志
String saleNo = yunguanSaleOrderModel.getORD_NO();
boolean inBoundNoExists = redisUtil.exists(saleNo);
if (inBoundNoExists){
QueryWrapper<BusinessOrderProductRelationalEntity> countQueryWrapper = new QueryWrapper<>();
countQueryWrapper.lambda().eq(BusinessOrderProductRelationalEntity::getBusinessOrderId,businessOrderEntity.getId());
countQueryWrapper.lambda().isNull(BusinessOrderProductRelationalEntity::getDeleteMark);
long count = businessOrderProductRelationalService.count(countQueryWrapper);
count++;
long size = redisUtil.getListSize(saleNo);
List<Object> objList = redisUtil.get(saleNo,0,size);
List<String> list = objList.stream().map(Object::toString).collect(Collectors.toList());
list.add(yunguanSaleOrderModel.getREAD_FLAG());
redisUtil.remove(saleNo);
redisUtil.insert(saleNo,list);
if (list.size() == count){
boolean dis = list.stream().distinct().count() <= 1;
if (dis){
businessOrderEntity.setYunguanMark(yunguanSaleOrderModel.getREAD_FLAG());
businessOrderEntity.setYunguanTime(yunguanSaleOrderModel.getREAD_TIME());
businessOrderEntity.setYunguanMassage(yunguanSaleOrderModel.getERR_MESSAGE());
businessOrderService.updateById(businessOrderEntity);
}
redisUtil.remove(saleNo);
}
}else {
List<String> list = new ArrayList<>(Collections.singleton(yunguanSaleOrderModel.getREAD_FLAG()));
redisUtil.insert(saleNo, list);
}
}
} else if (jsonObject.get("type").equals("销售订单行")) {
} else if (jsonObject.get("TYPE").equals("销售订单行")) {
YunguanSaleOrderProductModel yunguanSaleOrderProductModel = JsonUtil.getJsonToBean(str,YunguanSaleOrderProductModel.class);
if (StringUtils.isNotEmpty(yunguanSaleOrderProductModel.getORD_NO())){
QueryWrapper<BusinessOrderEntity> queryWrapper = new QueryWrapper<>();
@ -854,9 +995,44 @@ public class YunguanInterfaceController {
businessOrderProductRelationalEntity.setYunguanMassage(yunguanSaleOrderProductModel.getERR_MESSAGE());
businessOrderProductRelationalService.updateById(businessOrderProductRelationalEntity);
}
if (yunguanSaleOrderProductModel.getREAD_FLAG().equals("N")){
businessOrderEntity.setYunguanMark(yunguanSaleOrderProductModel.getREAD_FLAG());
businessOrderEntity.setYunguanTime(yunguanSaleOrderProductModel.getREAD_TIME());
businessOrderEntity.setYunguanMassage(yunguanSaleOrderProductModel.getERR_MESSAGE());
businessOrderService.updateById(businessOrderEntity);
}
//更新运管标志
String saleNo = yunguanSaleOrderProductModel.getORD_NO();
boolean inBoundNoExists = redisUtil.exists(saleNo);
if (inBoundNoExists){
QueryWrapper<BusinessOrderProductRelationalEntity> countQueryWrapper = new QueryWrapper<>();
countQueryWrapper.lambda().eq(BusinessOrderProductRelationalEntity::getBusinessOrderId,businessOrderEntity.getId());
countQueryWrapper.lambda().isNull(BusinessOrderProductRelationalEntity::getDeleteMark);
long count = businessOrderProductRelationalService.count(countQueryWrapper);
count++;
long size = redisUtil.getListSize(saleNo);
List<Object> objList = redisUtil.get(saleNo,0,size);
List<String> list = objList.stream().map(Object::toString).collect(Collectors.toList());
list.add(yunguanSaleOrderProductModel.getREAD_FLAG());
redisUtil.remove(saleNo);
redisUtil.insert(saleNo,list);
if (list.size() == count){
boolean dis = list.stream().distinct().count() <= 1;
if (dis){
businessOrderEntity.setYunguanMark(yunguanSaleOrderProductModel.getREAD_FLAG());
businessOrderEntity.setYunguanTime(yunguanSaleOrderProductModel.getREAD_TIME());
businessOrderEntity.setYunguanMassage(yunguanSaleOrderProductModel.getERR_MESSAGE());
businessOrderService.updateById(businessOrderEntity);
}
redisUtil.remove(saleNo);
}
}else {
List<String> list = new ArrayList<>(Collections.singleton(yunguanSaleOrderProductModel.getREAD_FLAG()));
redisUtil.insert(saleNo, list);
}
}
}
} else if (jsonObject.get("type").equals("采购入库")) {
} else if (jsonObject.get("TYPE").equals("采购入库")) {
YunguanPurchaseInBoundModel yunguanPurchaseInBoundModel = JsonUtil.getJsonToBean(str,YunguanPurchaseInBoundModel.class);
if (StringUtils.isNotEmpty(yunguanPurchaseInBoundModel.getRECEIPT_NO())){
QueryWrapper<WarehousingStorageEntity> warehousingStorageQueryWrapper = new QueryWrapper<>();
@ -865,23 +1041,51 @@ public class YunguanInterfaceController {
if (ObjectUtil.isNotEmpty(warehousingStorageEntity)){
QueryWrapper<WarehousingStorageProductEntity> warehousingStorageProductQueryWrapper = new QueryWrapper<>();
warehousingStorageProductQueryWrapper.lambda().eq(WarehousingStorageProductEntity::getWarehousingStorageId,warehousingStorageEntity.getId());
warehousingStorageProductQueryWrapper.lambda().eq(WarehousingStorageProductEntity::getOrdLn,yunguanPurchaseInBoundModel.getORD_LN());
warehousingStorageProductQueryWrapper.lambda().eq(WarehousingStorageProductEntity::getOrdLn,yunguanPurchaseInBoundModel.getORD_LN().replaceFirst("^0*",""));
WarehousingStorageProductEntity warehousingStorageProductEntity = warehousingStorageProductService.getOne(warehousingStorageProductQueryWrapper);
if (ObjectUtil.isNotEmpty(warehousingStorageProductEntity)){
warehousingStorageProductEntity.setYunguanMark(yunguanPurchaseInBoundModel.getREAD_FLAG());
warehousingStorageProductEntity.setYunguanTime(yunguanPurchaseInBoundModel.getREAD_TIME());
warehousingStorageProductEntity.setYunguanMassage(yunguanPurchaseInBoundModel.getERR_MESSAGE());
warehousingStorageProductService.updateById(warehousingStorageProductEntity);
if (!warehousingStorageEntity.getYunguanMark().equals("N")){
if (yunguanPurchaseInBoundModel.getREAD_FLAG().equals("N")){
warehousingStorageEntity.setYunguanMark(yunguanPurchaseInBoundModel.getREAD_FLAG());
warehousingStorageEntity.setYunguanTime(yunguanPurchaseInBoundModel.getREAD_TIME());
warehousingStorageEntity.setYunguanMassage(yunguanPurchaseInBoundModel.getERR_MESSAGE());
warehousingStorageService.updateById(warehousingStorageEntity);
}
//更新运管标志
String inBound = yunguanPurchaseInBoundModel.getRECEIPT_NO();
boolean inBoundNoExists = redisUtil.exists(inBound);
if (inBoundNoExists){
QueryWrapper<WarehousingStorageProductEntity> countQueryWrapper = new QueryWrapper<>();
countQueryWrapper.lambda().eq(WarehousingStorageProductEntity::getWarehousingStorageId,warehousingStorageEntity.getId());
countQueryWrapper.lambda().isNull(WarehousingStorageProductEntity::getDeleteMark);
long count = warehousingStorageProductService.count(countQueryWrapper); //入库单子表size
long size = redisUtil.getListSize(inBound);
List<Object> objList = redisUtil.get(inBound,0,size);
List<String> list = objList.stream().map(Object::toString).collect(Collectors.toList());
list.add(yunguanPurchaseInBoundModel.getREAD_FLAG());
redisUtil.remove(inBound);
redisUtil.insert(inBound,list);
if (list.size() == count){
boolean dis = list.stream().distinct().count() <= 1;
if (dis){
warehousingStorageEntity.setYunguanMark(yunguanPurchaseInBoundModel.getREAD_FLAG());
warehousingStorageEntity.setYunguanTime(yunguanPurchaseInBoundModel.getREAD_TIME());
warehousingStorageEntity.setYunguanMassage(yunguanPurchaseInBoundModel.getERR_MESSAGE());
warehousingStorageService.updateById(warehousingStorageEntity);
}
redisUtil.remove(inBound);
}
}else {
List<String> list = new ArrayList<>(Collections.singleton(yunguanPurchaseInBoundModel.getREAD_FLAG()));
redisUtil.insert(inBound, list);
}
}
}
}
} else if (jsonObject.get("type").equals("销售出库")) {
} else if (jsonObject.get("TYPE").equals("销售出库")) {
YunguanSaleOutBoundModel yunguanSaleOutBoundModel = JsonUtil.getJsonToBean(str,YunguanSaleOutBoundModel.class);
if (StringUtils.isNotEmpty(yunguanSaleOutBoundModel.getPROD_ZL())){
QueryWrapper<WarehousingOutboundEntity> warehousingOutboundQueryWrapper = new QueryWrapper<>();
@ -897,28 +1101,86 @@ public class YunguanInterfaceController {
warehousingOutboundProductEntity.setYunguanTime(yunguanSaleOutBoundModel.getREAD_TIME());
warehousingOutboundProductEntity.setYunguanMassage(yunguanSaleOutBoundModel.getERR_MESSAGE());
warehousingOutboundProductService.updateById(warehousingOutboundProductEntity);
if (!warehousingOutboundEntity.getYunguanMark().equals("N")){
if (yunguanSaleOutBoundModel.getREAD_FLAG().equals("N")){
warehousingOutboundEntity.setYunguanMark(yunguanSaleOutBoundModel.getREAD_FLAG());
warehousingOutboundEntity.setYunguanTime(yunguanSaleOutBoundModel.getREAD_TIME());
warehousingOutboundEntity.setYunguanMassage(yunguanSaleOutBoundModel.getERR_MESSAGE());
warehousingOutboundService.updateById(warehousingOutboundEntity);
}
//更新运管标志
String outBound = yunguanSaleOutBoundModel.getPROD_ZL();
boolean inBoundNoExists = redisUtil.exists(outBound);
if (inBoundNoExists){
QueryWrapper<WarehousingOutboundProductEntity> countQueryWrapper = new QueryWrapper<>();
countQueryWrapper.lambda().eq(WarehousingOutboundProductEntity::getWarehousingOutboundId,warehousingOutboundEntity.getId());
countQueryWrapper.lambda().isNull(WarehousingOutboundProductEntity::getDeleteMark);
long count = warehousingOutboundProductService.count(countQueryWrapper); //入库单子表size
long size = redisUtil.getListSize(outBound);
List<Object> objList = redisUtil.get(outBound,0,size);
List<String> list = objList.stream().map(Object::toString).collect(Collectors.toList());
list.add(yunguanSaleOutBoundModel.getREAD_FLAG());
redisUtil.remove(outBound);
redisUtil.insert(outBound,list);
if (list.size() == count){
boolean dis = list.stream().distinct().count() <= 1;
if (dis){
warehousingOutboundEntity.setYunguanMark(yunguanSaleOutBoundModel.getREAD_FLAG());
warehousingOutboundEntity.setYunguanTime(yunguanSaleOutBoundModel.getREAD_TIME());
warehousingOutboundEntity.setYunguanMassage(yunguanSaleOutBoundModel.getERR_MESSAGE());
warehousingOutboundService.updateById(warehousingOutboundEntity);
}
redisUtil.remove(outBound);
}
}else {
List<String> list = new ArrayList<>(Collections.singleton(yunguanSaleOutBoundModel.getREAD_FLAG()));
redisUtil.insert(outBound, list);
}
}
}
}
} else if (jsonObject.get("type").equals("采购结算头")) {
} else if (jsonObject.get("TYPE").equals("采购结算头")) {
YunguanPurchaseSettlementModel yunguanPurchaseSettlementModel = JsonUtil.getJsonToBean(str, YunguanPurchaseSettlementModel.class);
if (StringUtils.isNotEmpty(yunguanPurchaseSettlementModel.getACCOUNT_NO())){
QueryWrapper<CwsettlementEntity> cwsettlementQueryWrapper = new QueryWrapper<>();
cwsettlementQueryWrapper.lambda().eq(CwsettlementEntity::getCode,yunguanPurchaseSettlementModel.getACCOUNT_NO());
CwsettlementEntity cwsettlementEntity = cwsettlementService.getOne(cwsettlementQueryWrapper);
if (ObjectUtil.isNotEmpty(cwsettlementEntity)){
if (ObjectUtil.isNotEmpty(cwsettlementEntity) && yunguanPurchaseSettlementModel.getREAD_FLAG().equals("N")){
cwsettlementEntity.setYunguanMark(yunguanPurchaseSettlementModel.getREAD_FLAG());
cwsettlementEntity.setYunguanTime(yunguanPurchaseSettlementModel.getREAD_TIME());
cwsettlementEntity.setYunguanMassage(yunguanPurchaseSettlementModel.getERR_MESSAGE());
cwsettlementService.updateById(cwsettlementEntity);
}
//更新运管标志
String purSettlement = yunguanPurchaseSettlementModel.getACCOUNT_NO();
boolean inBoundNoExists = redisUtil.exists(purSettlement);
if (inBoundNoExists){
QueryWrapper<CwsettlementsummaryEntity> countQueryWrapper = new QueryWrapper<>();
countQueryWrapper.lambda().eq(CwsettlementsummaryEntity::getSettlementId,cwsettlementEntity.getId());
countQueryWrapper.lambda().isNull(CwsettlementsummaryEntity::getDeleteMark);
long count = cwsettlementsummaryService.count(countQueryWrapper);
count++;
long size = redisUtil.getListSize(purSettlement);
List<Object> objList = redisUtil.get(purSettlement,0,size);
List<String> list = objList.stream().map(Object::toString).collect(Collectors.toList());
list.add(yunguanPurchaseSettlementModel.getREAD_FLAG());
redisUtil.remove(purSettlement);
redisUtil.insert(purSettlement,list);
if (list.size() == count){
boolean dis = list.stream().distinct().count() <= 1;
if (dis){
cwsettlementEntity.setYunguanMark(yunguanPurchaseSettlementModel.getREAD_FLAG());
cwsettlementEntity.setYunguanTime(yunguanPurchaseSettlementModel.getREAD_TIME());
cwsettlementEntity.setYunguanMassage(yunguanPurchaseSettlementModel.getERR_MESSAGE());
cwsettlementService.updateById(cwsettlementEntity);
}
redisUtil.remove(purSettlement);
}
}else {
List<String> list = new ArrayList<>(Collections.singleton(yunguanPurchaseSettlementModel.getREAD_FLAG()));
redisUtil.insert(purSettlement, list);
}
}
} else if (jsonObject.get("type").equals("采购结算行")) {
} else if (jsonObject.get("TYPE").equals("采购结算行")) {
YunguanPurchaseSettlementProductModel yunguanPurchaseSettlementProductModel = JsonUtil.getJsonToBean(str, YunguanPurchaseSettlementProductModel.class);
if (StringUtils.isNotEmpty(yunguanPurchaseSettlementProductModel.getACCOUNT_NO())){
QueryWrapper<CwsettlementEntity> cwsettlementQueryWrapper = new QueryWrapper<>();
@ -935,71 +1197,240 @@ public class YunguanInterfaceController {
cwsettlementsummaryEntity.setYunguanMassage(yunguanPurchaseSettlementProductModel.getERR_MESSAGE());
cwsettlementsummaryService.updateById(cwsettlementsummaryEntity);
}
if (yunguanPurchaseSettlementProductModel.getREAD_FLAG().equals("N")){
cwsettlementEntity.setYunguanMark(yunguanPurchaseSettlementProductModel.getREAD_FLAG());
cwsettlementEntity.setYunguanTime(yunguanPurchaseSettlementProductModel.getREAD_TIME());
cwsettlementEntity.setYunguanMassage(yunguanPurchaseSettlementProductModel.getERR_MESSAGE());
cwsettlementService.updateById(cwsettlementEntity);
}
//更新运管标志
String purSettlement = yunguanPurchaseSettlementProductModel.getACCOUNT_NO();
boolean inBoundNoExists = redisUtil.exists(purSettlement);
if (inBoundNoExists){
QueryWrapper<CwsettlementsummaryEntity> countQueryWrapper = new QueryWrapper<>();
countQueryWrapper.lambda().eq(CwsettlementsummaryEntity::getSettlementId,cwsettlementEntity.getId());
countQueryWrapper.lambda().isNull(CwsettlementsummaryEntity::getDeleteMark);
long count = cwsettlementsummaryService.count(countQueryWrapper);
count++;
long size = redisUtil.getListSize(purSettlement);
List<Object> objList = redisUtil.get(purSettlement,0,size);
List<String> list = objList.stream().map(Object::toString).collect(Collectors.toList());
list.add(yunguanPurchaseSettlementProductModel.getREAD_FLAG());
redisUtil.remove(purSettlement);
redisUtil.insert(purSettlement,list);
if (list.size() == count){
boolean dis = list.stream().distinct().count() <= 1;
if (dis){
cwsettlementEntity.setYunguanMark(yunguanPurchaseSettlementProductModel.getREAD_FLAG());
cwsettlementEntity.setYunguanTime(yunguanPurchaseSettlementProductModel.getREAD_TIME());
cwsettlementEntity.setYunguanMassage(yunguanPurchaseSettlementProductModel.getERR_MESSAGE());
cwsettlementService.updateById(cwsettlementEntity);
}
redisUtil.remove(purSettlement);
}
}else {
List<String> list = new ArrayList<>(Collections.singleton(yunguanPurchaseSettlementProductModel.getREAD_FLAG()));
redisUtil.insert(purSettlement, list);
}
}
}
} else if (jsonObject.get("type").equals("销售结算头")) {
} else if (jsonObject.get("TYPE").equals("销售结算头")) {
YunguanSaleSettlementModel yunguanSaleSettlementModel = JsonUtil.getJsonToBean(str,YunguanSaleSettlementModel.class);
if (StringUtils.isNotEmpty(yunguanSaleSettlementModel.getINVOICE_NO())){
QueryWrapper<CwsettlementEntity> cwsettlementQueryWrapper = new QueryWrapper<>();
cwsettlementQueryWrapper.lambda().eq(CwsettlementEntity::getCode,yunguanSaleSettlementModel.getINVOICE_NO());
CwsettlementEntity cwsettlementEntity = cwsettlementService.getOne(cwsettlementQueryWrapper);
if (ObjectUtil.isNotEmpty(cwsettlementEntity)){
if (ObjectUtil.isNotEmpty(cwsettlementEntity) && yunguanSaleSettlementModel.getREAD_FLAG().equals("N")){
cwsettlementEntity.setYunguanMark(yunguanSaleSettlementModel.getREAD_FLAG());
cwsettlementEntity.setYunguanTime(yunguanSaleSettlementModel.getREAD_TIME());
cwsettlementEntity.setYunguanMassage(yunguanSaleSettlementModel.getERR_MESSAGE());
cwsettlementService.updateById(cwsettlementEntity);
}
//更新运管标志
String salSettlement = yunguanSaleSettlementModel.getINVOICE_NO();
boolean inBoundNoExists = redisUtil.exists(salSettlement);
if (inBoundNoExists){
QueryWrapper<CwsettlementsummaryEntity> countQueryWrapper = new QueryWrapper<>();
countQueryWrapper.lambda().eq(CwsettlementsummaryEntity::getSettlementId,cwsettlementEntity.getId());
countQueryWrapper.lambda().isNull(CwsettlementsummaryEntity::getDeleteMark);
long count = cwsettlementsummaryService.count(countQueryWrapper);
count++;
long size = redisUtil.getListSize(salSettlement);
List<Object> objList = redisUtil.get(salSettlement,0,size);
List<String> list = objList.stream().map(Object::toString).collect(Collectors.toList());
list.add(yunguanSaleSettlementModel.getREAD_FLAG());
redisUtil.remove(salSettlement);
redisUtil.insert(salSettlement,list);
if (list.size() == count){
boolean dis = list.stream().distinct().count() <= 1;
if (dis){
cwsettlementEntity.setYunguanMark(yunguanSaleSettlementModel.getREAD_FLAG());
cwsettlementEntity.setYunguanTime(yunguanSaleSettlementModel.getREAD_TIME());
cwsettlementEntity.setYunguanMassage(yunguanSaleSettlementModel.getERR_MESSAGE());
cwsettlementService.updateById(cwsettlementEntity);
}
redisUtil.remove(salSettlement);
}
}else {
List<String> list = new ArrayList<>(Collections.singleton(yunguanSaleSettlementModel.getREAD_FLAG()));
redisUtil.insert(salSettlement, list);
}
}
} else if (jsonObject.get("type").equals("销售结算行")) {
} else if (jsonObject.get("TYPE").equals("销售结算行")) {
YunguanSaleSettlementProductModel yunguanSaleSettlementProductModel = JsonUtil.getJsonToBean(str, YunguanSaleSettlementProductModel.class);
if (StringUtils.isNotEmpty(yunguanSaleSettlementProductModel.getINVOICE_NO())){
QueryWrapper<CwsettlementEntity> cwsettlementQueryWrapper = new QueryWrapper<>();
cwsettlementQueryWrapper.lambda().eq(CwsettlementEntity::getCode,yunguanSaleSettlementProductModel.getINVOICE_NO());
CwsettlementEntity cwsettlementEntity = cwsettlementService.getOne(cwsettlementQueryWrapper);
if (ObjectUtil.isNotEmpty(cwsettlementEntity)){
QueryWrapper<CwsettlementsummaryEntity> cwsettlementsummaryQueryWrapper = new QueryWrapper<>();
cwsettlementsummaryQueryWrapper.lambda().eq(CwsettlementsummaryEntity::getSettlementId,cwsettlementEntity.getId());
cwsettlementsummaryQueryWrapper.lambda().eq(CwsettlementsummaryEntity::getLineNo,yunguanSaleSettlementProductModel.getATTRIBUTE4());
CwsettlementsummaryEntity cwsettlementsummaryEntity = cwsettlementsummaryService.getOne(cwsettlementsummaryQueryWrapper);
if (ObjectUtil.isNotEmpty(cwsettlementsummaryEntity)){
cwsettlementsummaryEntity.setYunguanMark(yunguanSaleSettlementProductModel.getREAD_FLAG());
cwsettlementsummaryEntity.setYunguanTime(yunguanSaleSettlementProductModel.getREAD_TIME());
cwsettlementsummaryEntity.setYunguanMassage(yunguanSaleSettlementProductModel.getERR_MESSAGE());
cwsettlementsummaryService.updateById(cwsettlementsummaryEntity);
if (StringUtils.isNotEmpty(yunguanSaleSettlementProductModel.getATTRIBUTE4())) {
int index = yunguanSaleSettlementProductModel.getATTRIBUTE4().lastIndexOf("-");
String lineNo = yunguanSaleSettlementProductModel.getATTRIBUTE4().substring(index + 1).replaceFirst("^0*","");
QueryWrapper<CwsettlementsummaryEntity> cwsettlementsummaryQueryWrapper = new QueryWrapper<>();
cwsettlementsummaryQueryWrapper.lambda().eq(CwsettlementsummaryEntity::getSettlementId, cwsettlementEntity.getId());
cwsettlementsummaryQueryWrapper.lambda().eq(CwsettlementsummaryEntity::getLineNo, lineNo);
CwsettlementsummaryEntity cwsettlementsummaryEntity = cwsettlementsummaryService.getOne(cwsettlementsummaryQueryWrapper);
if (ObjectUtil.isNotEmpty(cwsettlementsummaryEntity)) {
cwsettlementsummaryEntity.setYunguanMark(yunguanSaleSettlementProductModel.getREAD_FLAG());
cwsettlementsummaryEntity.setYunguanTime(yunguanSaleSettlementProductModel.getREAD_TIME());
cwsettlementsummaryEntity.setYunguanMassage(yunguanSaleSettlementProductModel.getERR_MESSAGE());
cwsettlementsummaryService.updateById(cwsettlementsummaryEntity);
}
if (yunguanSaleSettlementProductModel.getREAD_FLAG().equals("N")) {
cwsettlementEntity.setYunguanMark(yunguanSaleSettlementProductModel.getREAD_FLAG());
cwsettlementEntity.setYunguanTime(yunguanSaleSettlementProductModel.getREAD_TIME());
cwsettlementEntity.setYunguanMassage(yunguanSaleSettlementProductModel.getERR_MESSAGE());
cwsettlementService.updateById(cwsettlementEntity);
}
//更新运管标志
String salSettlement = yunguanSaleSettlementProductModel.getINVOICE_NO();
boolean inBoundNoExists = redisUtil.exists(salSettlement);
if (inBoundNoExists){
QueryWrapper<CwsettlementsummaryEntity> countQueryWrapper = new QueryWrapper<>();
countQueryWrapper.lambda().eq(CwsettlementsummaryEntity::getSettlementId,cwsettlementEntity.getId());
countQueryWrapper.lambda().isNull(CwsettlementsummaryEntity::getDeleteMark);
long count = cwsettlementsummaryService.count(countQueryWrapper);
count++;
long size = redisUtil.getListSize(salSettlement);
List<Object> objList = redisUtil.get(salSettlement,0,size);
List<String> list = objList.stream().map(Object::toString).collect(Collectors.toList());
list.add(yunguanSaleSettlementProductModel.getREAD_FLAG());
redisUtil.remove(salSettlement);
redisUtil.insert(salSettlement,list);
if (list.size() == count){
boolean dis = list.stream().distinct().count() <= 1;
if (dis){
cwsettlementEntity.setYunguanMark(yunguanSaleSettlementProductModel.getREAD_FLAG());
cwsettlementEntity.setYunguanTime(yunguanSaleSettlementProductModel.getREAD_TIME());
cwsettlementEntity.setYunguanMassage(yunguanSaleSettlementProductModel.getERR_MESSAGE());
cwsettlementService.updateById(cwsettlementEntity);
}
redisUtil.remove(salSettlement);
}
}else {
List<String> list = new ArrayList<>(Collections.singleton(yunguanSaleSettlementProductModel.getREAD_FLAG()));
redisUtil.insert(salSettlement, list);
}
}
}
}
} else if (jsonObject.get("type").equals("生产加工")) {
} else if (jsonObject.get("TYPE").equals("生产加工")) {
YunguanProductProcessModel yunguanProductProcessModel = JsonUtil.getJsonToBean(str,YunguanProductProcessModel.class);
if (StringUtils.isNotEmpty(yunguanProductProcessModel.getTASK_NO())){
QueryWrapper<WorkOrderEntity> workOrderQueryWrapper = new QueryWrapper<>();
workOrderQueryWrapper.lambda().eq(WorkOrderEntity::getCode,yunguanProductProcessModel.getTASK_NO());
WorkOrderEntity workOrderEntity = workOrderService.getOne(workOrderQueryWrapper);
QueryWrapper<WorkOrderPrimaryEntity> countPrimaryQueryWrapper = new QueryWrapper<>();
countPrimaryQueryWrapper.lambda().eq(WorkOrderPrimaryEntity::getWorkId,workOrderEntity.getId());
countPrimaryQueryWrapper.lambda().isNull(WorkOrderPrimaryEntity::getDeleteMark);
long countPrimary = workOrderPrimaryService.count(countPrimaryQueryWrapper);
QueryWrapper<WorkOrderProductEntity> countProductQueryWrapper = new QueryWrapper<>();
countProductQueryWrapper.lambda().eq(WorkOrderProductEntity::getWorkId,workOrderEntity.getId());
countProductQueryWrapper.lambda().isNull(WorkOrderProductEntity::getDeleteMark);
long countProduct = workOrderProductService.count(countProductQueryWrapper);
long count = countPrimary+countProduct;
if (ObjectUtil.isNotEmpty(workOrderEntity)){
QueryWrapper<ProductWarehouseEntity> productQueryWrapper = new QueryWrapper<>();
productQueryWrapper.lambda().eq(ProductWarehouseEntity::getCode,yunguanProductProcessModel.getITEM_CD());
ProductWarehouseEntity productWarehouseEntity = productWarehouseService.getOne(productQueryWrapper);
if (StringUtils.isNotEmpty(yunguanProductProcessModel.getPRD_TY()) && yunguanProductProcessModel.getPRD_TY().equals("投入")){
QueryWrapper<WorkOrderPrimaryEntity> workOrderPrimaryQueryWrapper = new QueryWrapper<>();
workOrderPrimaryQueryWrapper.lambda().eq(WorkOrderPrimaryEntity::getWorkId,workOrderEntity.getId());
workOrderPrimaryQueryWrapper.lambda().eq(WorkOrderPrimaryEntity::getProductId,productWarehouseEntity.getId());
workOrderPrimaryQueryWrapper.lambda().eq(WorkOrderPrimaryEntity::getCode,yunguanProductProcessModel.getITEM_CD());
WorkOrderPrimaryEntity workOrderPrimaryEntity = workOrderPrimaryService.getOne(workOrderPrimaryQueryWrapper);
if (ObjectUtil.isNotEmpty(workOrderPrimaryEntity)){
workOrderPrimaryEntity.setYunguanMark(yunguanProductProcessModel.getREAD_FLAG());
workOrderPrimaryEntity.setYunguanTime(yunguanProductProcessModel.getREAD_TIME());
workOrderPrimaryEntity.setYunguanMassage(yunguanProductProcessModel.getERR_MESSAGE());
workOrderPrimaryService.updateById(workOrderPrimaryEntity);
if (yunguanProductProcessModel.getREAD_FLAG().equals("N")) {
workOrderEntity.setYunguanMark(yunguanProductProcessModel.getREAD_FLAG());
workOrderEntity.setYunguanTime(yunguanProductProcessModel.getREAD_TIME());
workOrderEntity.setYunguanMassage(yunguanProductProcessModel.getERR_MESSAGE());
workOrderService.updateById(workOrderEntity);
}
//更新运管标志
String taskNo = yunguanProductProcessModel.getTASK_NO();
boolean inBoundNoExists = redisUtil.exists(taskNo);
if (inBoundNoExists){
long size = redisUtil.getListSize(taskNo);
List<Object> objList = redisUtil.get(taskNo,0,size);
List<String> list = objList.stream().map(Object::toString).collect(Collectors.toList());
list.add(yunguanProductProcessModel.getREAD_FLAG());
redisUtil.remove(taskNo);
redisUtil.insert(taskNo,list);
if (list.size() == count){
boolean dis = list.stream().distinct().count() <= 1;
if (dis){
workOrderEntity.setYunguanMark(yunguanProductProcessModel.getREAD_FLAG());
workOrderEntity.setYunguanTime(yunguanProductProcessModel.getREAD_TIME());
workOrderEntity.setYunguanMassage(yunguanProductProcessModel.getERR_MESSAGE());
workOrderService.updateById(workOrderEntity);
}
redisUtil.remove(taskNo);
}
}else {
List<String> list = new ArrayList<>(Collections.singleton(yunguanProductProcessModel.getREAD_FLAG()));
redisUtil.insert(taskNo, list);
}
}
} else if (StringUtils.isNotEmpty(yunguanProductProcessModel.getPRD_TY()) && yunguanProductProcessModel.getPRD_TY().equals("产出")) {
QueryWrapper<WorkOrderProductEntity> workOrderProductQueryWrapper = new QueryWrapper<>();
workOrderProductQueryWrapper.lambda().eq(WorkOrderProductEntity::getWorkId,workOrderEntity.getId());
workOrderProductQueryWrapper.lambda().eq(WorkOrderProductEntity::getProductId,productWarehouseEntity.getId());
workOrderProductQueryWrapper.lambda().eq(WorkOrderProductEntity::getCode,yunguanProductProcessModel.getITEM_CD());
WorkOrderProductEntity workOrderProductEntity = workOrderProductService.getOne(workOrderProductQueryWrapper);
if (ObjectUtil.isNotEmpty(workOrderProductEntity)){
workOrderProductEntity.setYunguanMark(yunguanProductProcessModel.getREAD_FLAG());
workOrderProductEntity.setYunguanTime(yunguanProductProcessModel.getREAD_TIME());
workOrderProductEntity.setYunguanMassage(yunguanProductProcessModel.getERR_MESSAGE());
workOrderProductService.updateById(workOrderProductEntity);
if (yunguanProductProcessModel.getREAD_FLAG().equals("N")) {
workOrderEntity.setYunguanMark(yunguanProductProcessModel.getREAD_FLAG());
workOrderEntity.setYunguanTime(yunguanProductProcessModel.getREAD_TIME());
workOrderEntity.setYunguanMassage(yunguanProductProcessModel.getERR_MESSAGE());
workOrderService.updateById(workOrderEntity);
}
//更新运管标志
String taskNo = yunguanProductProcessModel.getTASK_NO();
boolean inBoundNoExists = redisUtil.exists(taskNo);
if (inBoundNoExists){
long size = redisUtil.getListSize(taskNo);
List<Object> objList = redisUtil.get(taskNo,0,size);
List<String> list = objList.stream().map(Object::toString).collect(Collectors.toList());
list.add(yunguanProductProcessModel.getREAD_FLAG());
redisUtil.remove(taskNo);
redisUtil.insert(taskNo,list);
if (list.size() == count){
boolean dis = list.stream().distinct().count() <= 1;
if (dis){
workOrderEntity.setYunguanMark(yunguanProductProcessModel.getREAD_FLAG());
workOrderEntity.setYunguanTime(yunguanProductProcessModel.getREAD_TIME());
workOrderEntity.setYunguanMassage(yunguanProductProcessModel.getERR_MESSAGE());
workOrderService.updateById(workOrderEntity);
}
redisUtil.remove(taskNo);
}
}else {
List<String> list = new ArrayList<>(Collections.singleton(yunguanProductProcessModel.getREAD_FLAG()));
redisUtil.insert(taskNo, list);
}
}
}
}

@ -1,5 +1,6 @@
package jnpf.entity;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.util.Date;
@ -56,6 +57,9 @@ public class BusinessOrderProductRelationalEntity {
private String name;
@TableField(value = "SPEC" , updateStrategy = FieldStrategy.IGNORED)
private String spec;
/** 编码 **/
@TableField(value = "CODE" , updateStrategy = FieldStrategy.IGNORED)
private String code;
@TableField(value = "INVENTORY_UNIT_ID" , updateStrategy = FieldStrategy.IGNORED)
private String inventoryUnitId;
@TableField(value = "REAL_BOUND" , updateStrategy = FieldStrategy.IGNORED)

@ -197,7 +197,9 @@ public class ContractLEntity {
private String salInvType;
@TableField("ADVANCE")
private String advance;
@TableField(exist = false)
private String islang;
}

@ -0,0 +1,63 @@
package jnpf.entity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.util.Date;
/**
*
*
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-07-15
*/
@Data
@TableName("jg_contract_relation")
public class ContractRelationEntity {
@TableId(value ="ID" )
private String id;
@TableField(value = "BUSINESS_ID" , updateStrategy = FieldStrategy.IGNORED)
private String businessId;
@TableField("PURCHASE_CONTRACT_CODE")
private String purchaseContractCode;
@TableField("PURCHASE_CONTRACT_NAME")
private String purchaseContractName;
@TableField("PURCHASE_CONTRACT_NO")
private String purchaseContractNo;
@TableField("SUPPLIER_NAME")
private String supplierName;
@TableField("SALE_CONTRACT_CODE")
private String saleContractCode;
@TableField("SALE_CONTRACT_NAME")
private String saleContractName;
@TableField("CUSTOMER_NAME")
private String customerName;
@TableField("SALE_CONTRACT_NO")
private String saleContractNo;
@TableField("F_CREATOR_TIME")
private Date creatorTime;
@TableField("F_CREATOR_USER_ID")
private String creatorUserId;
@TableField("F_LAST_MODIFY_TIME")
private Date lastModifyTime;
@TableField("F_LAST_MODIFY_USER_ID")
private String lastModifyUserId;
@TableField("F_DELETE_TIME")
private Date deleteTime;
@TableField("F_DELETE_USER_ID")
private String deleteUserId;
@TableField("F_DELETE_MARK")
private Integer deleteMark;
@TableField("F_TENANT_ID")
private String tenantId;
@TableField("COMPANY_ID")
private String companyId;
@TableField("DEPARTMENT_ID")
private String departmentId;
@TableField("ORGANIZE_JSON_ID")
private String organizeJsonId;
@TableField("F_FLOW_ID")
private String flowId;
@TableField("F_VERSION")
private Integer version;
}

@ -83,6 +83,9 @@ public class CwaccountsummaryEntity {
@TableField("ORGANIZE_JSON_ID")
private String organizeJsonId;
@TableField(value = "CODE" , updateStrategy = FieldStrategy.IGNORED)
private String code;
@TableField("ord_ln")
private String ordLn;
@TableField("business_code")
@ -93,4 +96,6 @@ public class CwaccountsummaryEntity {
private String warehouseName;
@TableField("storage_number")
private BigDecimal storageNumber;
@TableField(exist = false)
private String itemNmInv;
}

@ -60,6 +60,8 @@ public class CwaccountvoucherEntity {
private String productName;
@TableField(value = "SPEC" , updateStrategy = FieldStrategy.IGNORED)
private String spec;
@TableField(value = "UNIT" , updateStrategy = FieldStrategy.IGNORED)
private String unit;
@TableField(value = "GROSS_WEIGHT" , updateStrategy = FieldStrategy.IGNORED)
@ -153,4 +155,7 @@ public class CwaccountvoucherEntity {
@TableField(exist = false)
private BigDecimal storageNumber;
@TableField(exist = false)
private String code;
}

@ -30,6 +30,8 @@ public class CwsettlementsummaryEntity {
private String productId;
@TableField(value = "SPEC" , updateStrategy = FieldStrategy.IGNORED)
private String spec;
@TableField(value = "CODE" , updateStrategy = FieldStrategy.IGNORED)
private String code;
@TableField(value = "RATE" , updateStrategy = FieldStrategy.IGNORED)
private String rate;
@TableField(value = "SETTLEMENT_UNIT" , updateStrategy = FieldStrategy.IGNORED)

@ -200,6 +200,8 @@ public class VoucherEntity {
@TableField(exist = false)
private String productName;
@TableField(exist = false)
private String productCode;
@TableField(exist = false)
private List<ProductWarehouseEntity> productWarehouseEntityList;
@TableField(exist = false)
private List<WarehousingInspectionConclusionEntity> warehousingInspectionConclusionModelList;

@ -92,7 +92,13 @@ public class WorkOrderEntity {
private String realName;
@TableField(exist = false)
private String prodcutName;
private String proportionNum;
@TableField(exist = false)
private String unitId;
@TableField(exist = false)
private String productName;
@TableField(exist = false)
private String productCode;
@TableField(exist = false)
private List<ProductWarehouseEntity> productWarehouseEntityList;

@ -80,6 +80,10 @@ public class WorkOrderPrimaryEntity {
/** 投入/副产品 **/
@TableField(value = "IS_INPUT" , updateStrategy = FieldStrategy.IGNORED)
private String isInput;
/** 编码 **/
@TableField(value = "CODE" , updateStrategy = FieldStrategy.IGNORED)
private String code;
@TableField("ERP_MARK")
private String erpMark;
@TableField("ERP_MASSAGE")

@ -74,6 +74,10 @@ public class WorkOrderProductEntity {
@TableField(value = "BATCH_NUMBER" , updateStrategy = FieldStrategy.IGNORED)
private String batchNumber;
/** 编码 **/
@TableField(value = "CODE" , updateStrategy = FieldStrategy.IGNORED)
private String code;
@TableField(exist = false)
private BigDecimal nums;
@TableField("ERP_MARK")

@ -87,5 +87,9 @@ public class BusinessOrderPagination extends Pagination {
@JsonProperty("contractNumber")
private String contractNumber;
/** 合同编码 */
@JsonProperty("customer")
private String customer;
}

@ -27,6 +27,9 @@ public class BusinessOrderProductRelationalModel {
/** 规格 **/
@JSONField(name = "spec")
private String spec;
/** 编码 **/
@JSONField(name = "code")
private String code;
/** 库存单位 **/
@JSONField(name = "inventoryUnitId")
private String inventoryUnitId;

@ -45,4 +45,7 @@ public class ProductByContractModel {
private Object salesOrderQuantityUpper;
@JSONField(name = "salesOrderMultiple")
private Object salesOrderMultiple;
@JSONField(name = "code")
private String code;
}

@ -1,5 +1,6 @@
package jnpf.model.contractl;
import jnpf.model.contractrelation.ContractRelationForm;
import lombok.Data;
import java.util.List;
import java.math.BigDecimal;
@ -28,6 +29,9 @@ public class ContractLForm {
/** 子表数据 **/
@JsonProperty("contractLPaymentList")
private List<ContractLPaymentModel> contractLPaymentList;
/** 子表数据 **/
@JsonProperty("contractRelationList")
private List<ContractRelationModel> contractRelationList;
/** 乐观锁 **/
@JsonProperty("version")
private Integer version;

@ -36,4 +36,6 @@ public class ContractLPagination extends Pagination {
/** 合同名称 */
@JsonProperty("contractName")
private Object contractName;
@JsonProperty("excludeIdList")
private List<String> excludeIdList;
}

@ -0,0 +1,29 @@
package jnpf.model.contractl;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
/**
* contractRelation
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-07-15
*/
@Data
public class ContractRelationModel {
/** 主表id **/
@JSONField(name = "businessId")
private Object businessId;
/** 合同编码 **/
@JSONField(name = "purchaseContractCode")
private Object purchaseContractCode;
/** 合同名称 **/
@JSONField(name = "purchaseContractName")
private Object purchaseContractName;
/** 对方合同号 **/
@JSONField(name = "purchaseContractNo")
private Object purchaseContractNo;
}

@ -0,0 +1,41 @@
package jnpf.model.contractrelation;
import jnpf.util.JsonUtil;
import java.util.Map;
/**
* contractRelationjson
*
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-07-15
*/
public class ContractRelationConstant{
/** 数据库链接 */
public static final String DBLINKID = "0";
/** 表别名 map */
public static final Map<String,String> TABLERENAMES = JsonUtil.getJsonToBean("{\"jg_contract_relation\":\"contractRelation\"}",Map.class);
/** 子表model map */
public static final Map<String,String> TABLEFIELDKEY = JsonUtil.getJsonToBean("{}",Map.class);
/** 整个表单配置json */
public static final String getFormData(){
StringBuilder sb = new StringBuilder();
sb.append("{\"popupType\":\"general\",\"idGlobal\":101,\"formBtns\":false,\"labelWidth\":100,\"classNames\":[],\"className\":[],\"fullScreenWidth\":\"100%\",\"hasConfirmAndAddBtn\":false,\"labelPosition\":\"right\",\"printId\":\"\",\"disabled\":false,\"formModel\":\"dataForm\",\"cancelButtonText\":\"取 消\",\"confirmButtonText\":\"确 定\",\"hasCancelBtn\":true,\"primaryKeyPolicy\":1,\"confirmAndAddText\":\"确定并继续操作\",\"hasPrintBtn\":false,\"concurrencyLock\":true,\"classJson\":\"\",\"drawerWidth\":\"600px\",\"printButtonText\":\"打 印\",\"formRef\":\"formRef\",\"gutter\":15,\"logicalDelete\":true,\"size\":\"small\",\"formRules\":\"rules\",\"generalWidth\":\"1000px\",\"hasConfirmBtn\":true,\"formStyle\":\"\",\"fields\":[{\"clearable\":true,\"suffixIcon\":\"\",\"addonAfter\":\"\",\"__config__\":{\"formId\":101,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"input\",\"noShow\":false,\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"业务主表id合同\",\"trigger\":\"blur\",\"showLabel\":true,\"required\":false,\"tableName\":\"jg_contract_relation\",\"renderKey\":1721023058050,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-input\",\"unique\":false,\"tag\":\"JnpfInput\",\"regList\":[],\"span\":24},\"readonly\":false,\"showWordLimit\":false,\"__vModel__\":\"businessId\",\"showPassword\":false,\"style\":{\"width\":\"100%\"},\"disabled\":false,\"placeholder\":\"请输入\",\"prefixIcon\":\"\",\"addonBefore\":\"\"}],\"span\":24}"); return sb.toString();
}
/** 列表字段配置json */
public static final String getColumnData(){
StringBuilder sb = new StringBuilder();
sb.append("{\"showSummary\":false,\"hasPage\":true,\"searchList\":[],\"treeInterfaceId\":\"\",\"treePropsValue\":\"id\",\"ruleList\":{\"conditionList\":[],\"matchLogic\":\"and\"},\"childTableStyle\":1,\"columnOptions\":[{\"clearable\":true,\"suffixIcon\":\"\",\"fullName\":\"业务主表id合同\",\"addonAfter\":\"\",\"__config__\":{\"formId\":101,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"input\",\"noShow\":false,\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"业务主表id合同\",\"trigger\":\"blur\",\"showLabel\":true,\"required\":false,\"tableName\":\"jg_contract_relation\",\"renderKey\":1721023058050,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-input\",\"unique\":false,\"tag\":\"JnpfInput\",\"regList\":[],\"span\":24},\"readonly\":false,\"showWordLimit\":false,\"__vModel__\":\"businessId\",\"showPassword\":false,\"style\":{\"width\":\"100%\"},\"disabled\":false,\"id\":\"businessId\",\"placeholder\":\"请输入\",\"prefixIcon\":\"\",\"addonBefore\":\"\"}],\"pageSize\":20,\"treePropsChildren\":\"children\",\"type\":1,\"columnBtnsList\":[{\"icon\":\"icon-ym icon-ym-btn-edit\",\"label\":\"编辑\",\"value\":\"edit\"},{\"icon\":\"icon-ym icon-ym-btn-clearn\",\"label\":\"删除\",\"value\":\"remove\"},{\"icon\":\"icon-ym icon-ym-generator-menu\",\"label\":\"详情\",\"value\":\"detail\"}],\"thousandsField\":[],\"treeTitle\":\"左侧标题\",\"defaultColumnList\":[{\"suffixIcon\":\"\",\"align\":\"left\",\"__config__\":{\"formId\":101,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"input\",\"noShow\":false,\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"业务主表id合同\",\"trigger\":\"blur\",\"showLabel\":true,\"required\":false,\"tableName\":\"jg_contract_relation\",\"renderKey\":1721023058050,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-input\",\"unique\":false,\"tag\":\"JnpfInput\",\"regList\":[],\"span\":24},\"readonly\":false,\"prop\":\"businessId\",\"showWordLimit\":false,\"__vModel__\":\"businessId\",\"checked\":true,\"disabled\":false,\"id\":\"businessId\",\"placeholder\":\"请输入\",\"addonBefore\":\"\",\"clearable\":true,\"jnpfKey\":\"input\",\"fullName\":\"业务主表id合同\",\"label\":\"业务主表id合同\",\"sortable\":false,\"addonAfter\":\"\",\"showPassword\":false,\"fixed\":\"none\",\"style\":{\"width\":\"100%\"},\"prefixIcon\":\"\"}],\"treeTemplateJson\":[],\"treePropsName\":\"\",\"useColumnPermission\":false,\"treePropsUrl\":\"\",\"treeRelation\":\"\",\"treeSynType\":0,\"btnsList\":[{\"icon\":\"icon-ym icon-ym-btn-add\",\"label\":\"新增\",\"value\":\"add\"}],\"useDataPermission\":false,\"columnList\":[{\"clearable\":true,\"jnpfKey\":\"input\",\"suffixIcon\":\"\",\"fullName\":\"业务主表id合同\",\"label\":\"业务主表id合同\",\"sortable\":false,\"align\":\"left\",\"addonAfter\":\"\",\"__config__\":{\"formId\":101,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"input\",\"noShow\":false,\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"业务主表id合同\",\"trigger\":\"blur\",\"showLabel\":true,\"required\":false,\"tableName\":\"jg_contract_relation\",\"renderKey\":1721023058050,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-input\",\"unique\":false,\"tag\":\"JnpfInput\",\"regList\":[],\"span\":24},\"readonly\":false,\"prop\":\"businessId\",\"showWordLimit\":false,\"width\":0,\"__vModel__\":\"businessId\",\"showPassword\":false,\"fixed\":\"none\",\"style\":{\"width\":\"100%\"},\"disabled\":false,\"id\":\"businessId\",\"placeholder\":\"请输入\",\"prefixIcon\":\"\",\"addonBefore\":\"\"}],\"sort\":\"desc\",\"thousands\":false,\"hasSuperQuery\":true,\"summaryField\":[],\"parentField\":\"\",\"treePropsLabel\":\"fullName\",\"treeDataSource\":\"dictionary\",\"groupField\":\"\",\"printIds\":[],\"uploaderTemplateJson\":{},\"treeDictionary\":\"\",\"hasTreeQuery\":false,\"useFormPermission\":false,\"customBtnsList\":[],\"complexHeaderList\":[],\"useBtnPermission\":false,\"treeInterfaceName\":\"\",\"defaultSidx\":\"\"}"); return sb.toString();
}
/** app列表字段配置json */
public static final String getAppColumnData(){
StringBuilder sb = new StringBuilder();
sb.append("{\"hasPage\":true,\"useColumnPermission\":false,\"searchList\":[],\"btnsList\":[{\"icon\":\"icon-ym icon-ym-btn-add\",\"label\":\"新增\",\"value\":\"add\"}],\"useDataPermission\":false,\"ruleListApp\":{\"conditionList\":[],\"matchLogic\":\"and\"},\"columnList\":[{\"clearable\":true,\"jnpfKey\":\"input\",\"suffixIcon\":\"\",\"fullName\":\"业务主表id合同\",\"label\":\"业务主表id合同\",\"sortable\":false,\"align\":\"left\",\"addonAfter\":\"\",\"__config__\":{\"formId\":101,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"input\",\"noShow\":false,\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"业务主表id合同\",\"trigger\":\"blur\",\"showLabel\":true,\"required\":false,\"tableName\":\"jg_contract_relation\",\"renderKey\":1721023058050,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-input\",\"unique\":false,\"tag\":\"JnpfInput\",\"regList\":[],\"span\":24},\"readonly\":false,\"prop\":\"businessId\",\"showWordLimit\":false,\"width\":0,\"__vModel__\":\"businessId\",\"showPassword\":false,\"fixed\":\"none\",\"style\":{\"width\":\"100%\"},\"disabled\":false,\"id\":\"businessId\",\"placeholder\":\"请输入\",\"prefixIcon\":\"\",\"addonBefore\":\"\"}],\"columnOptions\":[{\"clearable\":true,\"suffixIcon\":\"\",\"fullName\":\"业务主表id合同\",\"addonAfter\":\"\",\"__config__\":{\"formId\":101,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"input\",\"noShow\":false,\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"业务主表id合同\",\"trigger\":\"blur\",\"showLabel\":true,\"required\":false,\"tableName\":\"jg_contract_relation\",\"renderKey\":1721023058050,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-input\",\"unique\":false,\"tag\":\"JnpfInput\",\"regList\":[],\"span\":24},\"readonly\":false,\"showWordLimit\":false,\"__vModel__\":\"businessId\",\"showPassword\":false,\"style\":{\"width\":\"100%\"},\"disabled\":false,\"placeholder\":\"请输入\",\"id\":\"businessId\",\"prefixIcon\":\"\",\"addonBefore\":\"\"}],\"pageSize\":20,\"sort\":\"desc\",\"thousands\":false,\"columnBtnsList\":[{\"icon\":\"icon-ym icon-ym-btn-edit\",\"label\":\"编辑\",\"value\":\"edit\"},{\"icon\":\"icon-ym icon-ym-btn-clearn\",\"label\":\"删除\",\"value\":\"remove\"},{\"icon\":\"icon-ym icon-ym-generator-menu\",\"label\":\"详情\",\"value\":\"detail\"}],\"loading\":false,\"hasSuperQuery\":false,\"thousandsField\":[],\"defaultColumnList\":[{\"clearable\":true,\"jnpfKey\":\"input\",\"suffixIcon\":\"\",\"fullName\":\"业务主表id合同\",\"label\":\"业务主表id合同\",\"sortable\":false,\"align\":\"left\",\"addonAfter\":\"\",\"__config__\":{\"formId\":101,\"visibility\":[\"pc\",\"app\"],\"jnpfKey\":\"input\",\"noShow\":false,\"tipLabel\":\"\",\"dragDisabled\":false,\"className\":[],\"label\":\"业务主表id合同\",\"trigger\":\"blur\",\"showLabel\":true,\"required\":false,\"tableName\":\"jg_contract_relation\",\"renderKey\":1721023058050,\"layout\":\"colFormItem\",\"tagIcon\":\"icon-ym icon-ym-generator-input\",\"unique\":false,\"tag\":\"JnpfInput\",\"regList\":[],\"span\":24},\"readonly\":false,\"prop\":\"businessId\",\"showWordLimit\":false,\"__vModel__\":\"businessId\",\"showPassword\":false,\"checked\":false,\"style\":{\"width\":\"100%\"},\"disabled\":false,\"placeholder\":\"请输入\",\"id\":\"businessId\",\"prefixIcon\":\"\",\"addonBefore\":\"\"}],\"sortList\":[],\"useFormPermission\":false,\"customBtnsList\":[],\"useBtnPermission\":false,\"defaultSidx\":\"\"}"); return sb.toString();
}
/** 表列表 */
public static final String getTableList(){
StringBuilder sb = new StringBuilder();
sb.append("[{\"relationField\":\"\",\"relationTable\":\"\",\"table\":\"jg_contract_relation\",\"tableName\":\"合同对应关系表\",\"tableField\":\"\",\"typeId\":\"1\",\"fields\":[{\"columnName\":\"id\",\"field\":\"id\",\"fieldName\":\"ID\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":1,\"allowNull\":0,\"autoIncrement\":0},{\"columnName\":\"business_id\",\"field\":\"businessId\",\"fieldName\":\"业务主表id合同\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"purchase_contract_code\",\"field\":\"purchaseContractCode\",\"fieldName\":\"采购合同编码\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"purchase_contract_name\",\"field\":\"purchaseContractName\",\"fieldName\":\"采购合同名称\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"purchase_contract_no\",\"field\":\"purchaseContractNo\",\"fieldName\":\"采购合同对方合同号\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"supplier_name\",\"field\":\"supplierName\",\"fieldName\":\"供应商名称\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"sale_contract_code\",\"field\":\"saleContractCode\",\"fieldName\":\"销售合同编码\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"sale_contract_name\",\"field\":\"saleContractName\",\"fieldName\":\"销售合同名称\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"customer_name\",\"field\":\"customerName\",\"fieldName\":\"客户名称\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"sale_contract_no\",\"field\":\"saleContractNo\",\"fieldName\":\"销售合同对方合同号\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"f_creator_time\",\"field\":\"creatorTime\",\"fieldName\":\"创建时间\",\"dataType\":\"datetime\",\"dataLength\":\"默认\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"f_creator_user_id\",\"field\":\"creatorUserId\",\"fieldName\":\"创建用户\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"f_last_modify_time\",\"field\":\"lastModifyTime\",\"fieldName\":\"修改时间\",\"dataType\":\"datetime\",\"dataLength\":\"默认\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"f_last_modify_user_id\",\"field\":\"lastModifyUserId\",\"fieldName\":\"修改用户\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"f_delete_time\",\"field\":\"deleteTime\",\"fieldName\":\"删除时间\",\"dataType\":\"datetime\",\"dataLength\":\"默认\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"f_delete_user_id\",\"field\":\"deleteUserId\",\"fieldName\":\"删除用户\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"f_delete_mark\",\"field\":\"deleteMark\",\"fieldName\":\"删除标志\",\"dataType\":\"int\",\"dataLength\":\"默认\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"f_tenant_id\",\"field\":\"tenantId\",\"fieldName\":\"租户id\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"company_id\",\"field\":\"companyId\",\"fieldName\":\"公司id\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"department_id\",\"field\":\"departmentId\",\"fieldName\":\"部门id\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"organize_json_id\",\"field\":\"organizeJsonId\",\"fieldName\":\"组织id\",\"dataType\":\"varchar\",\"dataLength\":\"1000\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0},{\"columnName\":\"f_flow_id\",\"field\":\"flowId\",\"fieldName\":\"流程id\",\"dataType\":\"varchar\",\"dataLength\":\"50\",\"primaryKey\":0,\"allowNull\":1,\"autoIncrement\":0}]}]"); return sb.toString();
}
}

@ -0,0 +1,26 @@
package jnpf.model.contractrelation;
import lombok.Data;
import java.util.List;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* contractRelation
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-07-15
*/
@Data
public class ContractRelationForm {
/** 主键 */
private String id;
/** 乐观锁 **/
@JsonProperty("version")
private Integer version;
/** 业务主表id合同 **/
@JsonProperty("businessId")
private String businessId;
}

@ -0,0 +1,30 @@
package jnpf.model.contractrelation;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import jnpf.base.Pagination;
import java.util.List;
/**
*
* contractRelation
* @ V3.5
* @ https://www.jnpfsoft.com
* @ JNPF
* @ 2024-07-15
*/
@Data
public class ContractRelationPagination extends Pagination {
/** 查询key */
private String[] selectKey;
/** json */
private String json;
/** 数据类型 0-当前页1-全部数据 */
private String dataType;
/** 高级查询 */
private String superQueryJson;
/** 功能id */
private String moduleId;
/** 菜单id */
private String menuId;
}

@ -25,6 +25,9 @@ public class CwaccountsummaryModel {
/** 规格 **/
@JSONField(name = "spec")
private String spec;
/** 编码 **/
@JSONField(name = "code")
private String code;
/** 库存单位 **/
@JSONField(name = "inventoryUnitId")
private String inventoryUnitId;

@ -55,6 +55,9 @@ public class CwaccountvoucherModel {
/** 规格 **/
@JSONField(name = "spec")
private String spec;
/** 编码 **/
@JSONField(name = "code")
private String code;
/** 单位 **/
@JSONField(name = "unit")
private String unit;

@ -25,6 +25,9 @@ public class CwsettlementsummaryModel {
/** 规格 **/
@JSONField(name = "spec")
private String spec;
/** 编码 **/
@JSONField(name = "code")
private String code;
/** 结算单位 **/
@JSONField(name = "settlementUnit")
private String settlementUnit;

@ -152,4 +152,8 @@ public class VoucherForm {
/** 销售额 **/
@JsonProperty("saleAmount")
private BigDecimal saleAmount;
/** 订单id **/
@JsonProperty("businessOrderId")
private String businessOrderId;
}

@ -95,12 +95,21 @@ public class VoucherPagination extends Pagination {
/** 采购订单/销售订单 */
@JsonProperty("businessOrderNo")
private String businessOrderNo;
/** 制单人 */
@JsonProperty("creatorUserName")
private String creatorUserName;
/** 车船号 */
@JsonProperty("vehicleName")
private String vehicleName;
/** 备注(公司) */
@JsonProperty("remark1")
private String remark1;
/** 是否生成销售凭证 */
@JsonProperty("isSaleDeliveryVoucher")
private Object isSaleDeliveryVoucher;
/** 是否生成销售订单 */
@JsonProperty("isTransfer")
private Object isTransfer;
}

@ -62,4 +62,7 @@ public class WorkOrderPrimaryModel {
@JSONField(name = "isInput")
private String isInput;
/** 商品编码 **/
@JSONField(name = "code")
private String code;
}

@ -65,6 +65,10 @@ public class WorkOrderProductModel {
@JSONField(name = "batchNumber")
private String batchNumber;
/** 商品编码 **/
@JSONField(name = "code")
private String code;
}

@ -95,4 +95,7 @@ public class YunguanProductProcessModel {
/** ESB错误信息 **/
@JSONField(name = "ESB_MESSAGE")
private String ESB_MESSAGE;
/** 部门编码 **/
@JSONField(name = "ADD_DEPT_CODE")
private String ADD_DEPT_CODE;
}

@ -25,8 +25,8 @@ public class YunguanPurchaseSettlementModel {
private String ACCOUNT_NO;
@JSONField(name = "VENDOR_CD")
private String VENDOR_CD;
@JSONField(name = "VENDOR_NAME")
private String VENDOR_NAME;
@JSONField(name = "VENDOR_NM")
private String VENDOR_NM;
@JSONField(name = "VENDOR_SITE_CODE")
private String VENDOR_SITE_CODE;
@JSONField(name = "ATTRIBUTE10")
@ -100,4 +100,6 @@ public class YunguanPurchaseSettlementModel {
private String ATTRIBUTE11;
@JSONField(name = "INVOICE_AMOUNT")
private BigDecimal INVOICE_AMOUNT;
@JSONField(name = "LINE_SUM")
private Integer LINE_SUM;
}

@ -107,4 +107,7 @@ public class YunguanSaleOutBoundModel {
/** ESB错误信息 **/
@JSONField(name = "ESB_MESSAGE")
private String ESB_MESSAGE;
/** 采购订单号-行号 **/
@JSONField(name = "PUR_ORDER")
private String PUR_ORDER;
}

@ -934,6 +934,7 @@ public class DataInterfaceServiceImpl extends SuperServiceImpl<DataInterfaceMapp
}
sql = sql.replaceAll(DataInterfaceVarConst.USER, "?");
sql = sql.replaceAll(DataInterfaceVarConst.ORG, "?");
sql = sql.replaceAll(DataInterfaceVarConst.det, "?");
sql = sql.replaceAll(DataInterfaceVarConst.KEYWORD, "?");
sql = sql.replaceAll(DataInterfaceVarConst.OFFSETSIZE, "?");
sql = sql.replaceAll(DataInterfaceVarConst.PAGESIZE, "?");
@ -1294,6 +1295,21 @@ public class DataInterfaceServiceImpl extends SuperServiceImpl<DataInterfaceMapp
orgId = orgId.replace("]","");
DataInterfaceParamUtil.getParamModel(paramValue, sql, DataInterfaceVarConst.ORG, orgId);
}
//当前部门
if (sql.contains(DataInterfaceVarConst.det)) {
String dept = userInfo.getOrganizeId();
String dept1 = userInfo.getDepartmentId();
/*if (StringUtil.isNotEmpty(userInfo.getDepartmentId())) {
orgId = userInfo.getDepartmentId();
}*/
// OrganizeEntity organizeEntity = organizeApi.getInfo(orgId);
// List<String> organizeJsonId = Arrays.stream(organizeEntity.getCompanyIdTree().split(",")).collect(Collectors.toList());
// orgId = JSON.toJSONString(organizeJsonId);
// orgId = orgId.replace("[","");
// orgId = orgId.replace("]","");
DataInterfaceParamUtil.getParamModel(paramValue, sql, DataInterfaceVarConst.det, dept);
}
//关键字
if (sql.contains(DataInterfaceVarConst.KEYWORD)) {
DataInterfaceParamUtil.getParamModel(paramValue, sql, DataInterfaceVarConst.KEYWORD, pagination.getKeyword());

@ -221,6 +221,28 @@
}
}
.el-table__body-wrapper {
z-index: 2;
}
.el-table__fixed-footer-wrapper tbody td.custom-cell {
border-right: 1px solid #dbdfe5 !important;
}
.el-table {
.el-table__fixed {
height: auto !important;
bottom: 0px !important;
}
}
//线
.el-table__fixed::before,
.el-table__fixed-right::before {
display: none;
}
.JNPF-table-delBtn {
color: #ff3a3a !important;

@ -337,16 +337,16 @@ export default {
this.visible = false;
},
rowClick(row) {
if(this.checked == row[this.propsValue]){
if (this.checked == row[this.propsValue]) {
this.select();
}else{
} else {
this.checked = row[this.propsValue];
this.checkedTxt = row[this.relationField];
this.checkedRow = row;
}
},
dbRowClick(row){
dbRowClick(row) {
this.checked = row[this.propsValue];
this.checkedTxt = row[this.relationField];
this.checkedRow = row;

@ -159,6 +159,7 @@ import SuperQuery from "@/components/SuperQuery";
import superQueryJson from "./superQueryJson";
export default {
name: 'kehuzhongxin.kehuguanli',
components: {
FlowBox,
FlowBusinessConfigBox,

@ -948,6 +948,21 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="规格" v-if="judgeShow('cwaccountsummary-spec')" prop="spec"
align="center" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwaccountsummaryList-spec')"></span>编码
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.code"
@change="changeData('cwaccountsummary-spec',scope.$index)" placeholder="请输入"
:disabled="true" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算单位" v-if="judgeShow('cwaccountsummary-settlementUnit')"
prop="settlementUnit" align="center" width="150">
<template slot="header">
@ -1371,6 +1386,7 @@ export default {
productId: '',
productIdOptions: [],
spec: '',
code: '',
specOptions: [],
inventoryUnitId: '',
inventoryUnitIdOptions: [],
@ -1887,6 +1903,26 @@ export default {
}
//this.addcwaccountvoucherList();
},
// initList(list) {
// let mark = false
// for (let i = 0; i < list.length; i++) {
// const e = list[i];
// if (e.yunguanMark == 'Y') {
// this.dataForm.cwaccountstorageList.push(e)
// } else {
// mark = true
// }
// }
// if (mark) {
// this.$message({
// message: '',
// type: 'error',
// duration: 1000
// });
// return
// }
// //this.addcwaccountvoucherList();
// },
typeChangeData() {
this.dataForm.cwaccountsubjectList = [];
this.dataForm.cwaccountcontractList = [];
@ -2680,7 +2716,7 @@ export default {
found.otherExpenses = this.jnpf.floatSub(Number(found.otherExpenses), Number(cur.otherExpenses)).toFixed(2);
}
} else {
acc.push({ productId: cur.productId, productName: cur.productName, spec: cur.spec, rate: cur.rate, settlementSum: cur.settlementSum, settlementTotal: cur.taxCount, settlementUnit: cur.unit, settlementPrice: cur.businessPrice, settlementSubtotal: cur.taxCount, settlementPriceNo: cur.notTaxPrice, settlementSubtotalNo: cur.notTaxCount, otherType: cur.otherType, otherExpenses: cur.otherExpenses, settlementTotal: cur.taxCount, settlementTotalNo: cur.notTaxCount, businessOrderId: cur.businessOrderId, orderNo: cur.orderNo })
acc.push({ productId: cur.productId, productName: cur.productName, spec: cur.spec, code: cur.code, rate: cur.rate, settlementSum: cur.settlementSum, settlementTotal: cur.taxCount, settlementUnit: cur.unit, settlementPrice: cur.businessPrice, settlementSubtotal: cur.taxCount, settlementPriceNo: cur.notTaxPrice, settlementSubtotalNo: cur.notTaxCount, otherType: cur.otherType, otherExpenses: cur.otherExpenses, settlementTotal: cur.taxCount, settlementTotalNo: cur.notTaxCount, businessOrderId: cur.businessOrderId, orderNo: cur.orderNo })
}
return acc
}, [])

@ -238,6 +238,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name: 'statement of account',
components: {
FlowBox,
ExportBox,

@ -1347,9 +1347,14 @@
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="发票编号" prop="invoiceNo">
<JnpfInput v-model="dataForm.invoiceNo" @change="changeData('settlableAmount',-1)"
<!-- <JnpfInput v-model="dataForm.invoiceNo" @change="changeData('settlableAmount',-1)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput> -->
<JnpfInput v-model="dataForm.invoiceNo" @change="changeData('invoiceNo',-1)"
placeholder="系统自动生成" :disabled="true" readonly :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
@ -1361,10 +1366,11 @@
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="发票号" prop="attribute11">
<jnpf-form-tip-item label="发票" prop="attribute11">
<JnpfInput v-model="dataForm.attribute11" @change="changeData('attribute11',-1)"
placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
@ -1420,17 +1426,22 @@
<span style="font-size: 14px;font-weight: 500;color:rgb(102, 102, 102);">结算汇总</span>
</div>
</el-col>
<el-col :span="8">
<el-input style="width: 200px; margin-right:10px" v-model="dataForm.remark1" />
<el-button type="primary" icon="icon-ym icon-ym-btn-add"
@click="openInput">输入开票商品名称</el-button>
</el-col>
<template
v-if="dataForm.cwsettlementcontractList && dataForm.cwsettlementcontractList.length>0 &&dataForm.cwsettlementcontractList[0].businessId=='550709408384942213' ">
<el-col :span="8">
<el-input style="width: 200px; margin-right:10px" v-model="dataForm.remark1" />
输入开票商品名称
<!-- <el-button type="primary" icon="icon-ym icon-ym-btn-add"
@click="openInput">输入开票商品名称</el-button> -->
</el-col>
<el-col :span="8">
<el-input style="width: 200px; margin-right:10px" v-model="dataForm.remark2" />
<el-button type="primary" icon="icon-ym icon-ym-btn-add"
@click="openInput1">输入规格</el-button>
</el-col>
<el-col :span="8">
<el-input style="width: 200px; margin-right:10px" v-model="dataForm.remark2" />
输入规格
<el-button type="primary" icon="icon-ym icon-ym-btn-add" @click="openInput1">
确认</el-button>
</el-col>
</template>
<!-- <el-col :span="8">
<jnpf-form-tip-item label="汇总类型">
<JnpfSelect v-model="dataForm.summaryType" @change="changeData('summaryType', -1)"
@ -1505,6 +1516,21 @@
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="规格" v-if="judgeShow('cwsettlementsummary-spec')" prop="spec"
align="center" width="150">
<template slot="header">
<span class="required-sign"
v-if="judgeRequired('cwsettlementsummaryList-spec')"></span>编码
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.code"
@change="changeData('cwsettlementsummary-spec',scope.$index)"
placeholder="请输入" :disabled="true" clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="结算单位" v-if="judgeShow('cwsettlementsummary-settlementUnit')"
prop="settlementUnit" align="center" width="150">
<template slot="header">
@ -1825,6 +1851,7 @@ export default {
enabledmark: undefined
},
cwsettlementcontractList: {
businessId: '',
contractId: '',
contractIdOptions: [],
contractPeriodTime: '',
@ -1921,6 +1948,7 @@ export default {
productId: '',
productIdOptions: [],
spec: '',
code: '',
itemNmInv: '',
specOptions: [],
settlementUnit: '',
@ -2535,16 +2563,17 @@ export default {
this.multipleSelection = val;
},
openInput() {
console.log(this.multipleSelection, this.dataForm.remark1, '第一个按钮');
this.multipleSelection.forEach((item) => {
item.itemNmInv = this.dataForm.remark1 //
})
},
// openInput() {
// console.log(this.multipleSelection, this.dataForm.remark1, '');
// this.multipleSelection.forEach((item) => {
// item.itemNmInv = this.dataForm.remark1 //
// })
// },
openInput1() {
debugger
console.log(this.multipleSelection, this.dataForm.remark2, '第二个按钮');
// debugger
this.multipleSelection.forEach((item) => {
// item.itemNmInv = this.dataForm.remark1 //
item.itemNmInv = this.dataForm.remark1 //
item.spec = this.dataForm.remark2 //
})
},
@ -2613,7 +2642,7 @@ export default {
found.otherExpenses = this.jnpf.floatSub(Number(found.otherExpenses), Number(cur.otherExpenses)).toFixed(2);
}
} else {
acc.push({ productId: cur.productId, productName: cur.productName, spec: cur.spec, rate: cur.rate, settlementSum: cur.settlementSum, settlementTotal: cur.settlementTotal, settlementUnit: cur.settlementUnit, settlementPrice: cur.settlementPrice, settlementSubtotal: cur.settlementSubtotal, settlementPriceNo: cur.settlementPriceNo, settlementSubtotalNo: cur.settlementSubtotalNo, otherType: cur.otherType, otherExpenses: cur.otherExpenses, settlementTotal: cur.settlementTotal, settlementTotalNo: cur.settlementTotalNo })
acc.push({ productId: cur.productId, productName: cur.productName, spec: cur.spec, code: cur.code, rate: cur.rate, settlementSum: cur.settlementSum, settlementTotal: cur.settlementTotal, settlementUnit: cur.settlementUnit, settlementPrice: cur.settlementPrice, settlementSubtotal: cur.settlementSubtotal, settlementPriceNo: cur.settlementPriceNo, settlementSubtotalNo: cur.settlementSubtotalNo, otherType: cur.otherType, otherExpenses: cur.otherExpenses, settlementTotal: cur.settlementTotal, settlementTotalNo: cur.settlementTotalNo })
}
return acc
}, [])
@ -2691,6 +2720,8 @@ export default {
this.dataForm.cwsettlementcontractList[rowIndex].deliveryMethod = row.delivery_method;
this.dataForm.cwsettlementcontractList[rowIndex].modeTransport = row.mode_transport;
this.dataForm.cwsettlementcontractList[rowIndex].costBearingMian = row.cost_bearing_mian;
this.dataForm.cwsettlementcontractList[rowIndex].businessId = row.business_id;
},
subjectChangeData(model, row) {
let aaa = {};
@ -2968,6 +2999,8 @@ export default {
},
//
initDefaultData() {
this.dataForm.invoiceDate = new Date().getTime()
this.dataForm.glDate = new Date().getTime()
},
addcwsettlementsubjectList() {
@ -3003,6 +3036,16 @@ export default {
this.childIndex = -1
},
addcwsettlementcontractList() {
if (this.dataForm.cwsettlementcontractList.length >= 1) {
this.$message({
type: 'error',
message: '只能选一条合同',
duration: 1500,
})
return
}
let item = {
contractId: '',
contractPeriodTime: undefined,
@ -3206,6 +3249,7 @@ export default {
this.dataForm.cwsettlementsummaryList = res.data;
this.dataForm.cwsettlementsummaryList.forEach(item => {
// item.itemNmInv = ''
item.settlementPrice = this.jnpf.floatDiv(item.settlementSubtotal, item.settlementSum);//
item.settlementPriceNo = this.jnpf.floatDiv(item.settlementSubtotalNo, item.settlementSum);//
summarySettlementSum = this.jnpf.floatAdd(summarySettlementSum, item.settlementSum).toFixed(4);//

@ -210,7 +210,7 @@
<el-button size="mini" type="text"
v-if="scope.row.settlableAmount > 0 && scope.row.flowState==2"
@click="shoufukuanHandle(scope.row)">收付款</el-button>
<!-- <template v-if="scope.row.yunguanMark !== 'Y'">
<!-- <template v-if="scope.row.flowState == 2 && scope.row.erpMark != '200'">
<el-button size="mini" type="text" @click="repush(scope.row)"></el-button>
</template> -->
</template>
@ -282,6 +282,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name: 'Settlement Doc',
components: {
FlowBox,
FlowBoxCWSettlement,
@ -518,9 +519,9 @@ export default {
repush(val) {
debugger
let orderType = ''
if (val.type == '采购结算') {
if (val.type == '1') {
orderType = '6'
} else if (val.type == '销售结算') {
} else if (val.type == '2') {
orderType = '7'
}
let param = {
@ -606,7 +607,7 @@ export default {
if (index === 0) {
sums[index] = '合计';
return;
} else if (["docmentNum", "settledAmount", "settlementAmount", "settlementExpenses", "paymentAmount",
} else if (["docmentNum", "settledAmount", "settlementSum", "settlementAmount", "settlementExpenses", "paymentAmount",
"prepaidDeductionAmount", "returnAmount", "marginAmount", "underpaymentAmount", "overdueAmount",
"payableAmount", "currentMarginAmount", "currentUnderpaymentAmount", "settlableAmount", "applyAmount"
].includes(column.property)) {

@ -1,6 +1,7 @@
<template>
<el-dialog title="选择对账单" :close-on-click-modal="false" :visible.sync="visible"
class="JNPF-dialog JNPF-dialog_center" lock-scroll append-to-body width="800px">
<el-dialog title="选择对账单1" :close-on-click-modal="false" :visible.sync="visible"
@row-click="rowClick" @row-dblclick="rowdbclick" class="JNPF-dialog JNPF-dialog_center"
lock-scroll append-to-body width="800px">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="10">
@ -96,6 +97,30 @@ export default {
}
},
methods: {
select() {
if (!this.checked) return
this.$emit('input', this.checked)
this.$emit('change', this.checked, this.checkedRow)
this.visible = false
},
// select() {
// if (this.checked == '') return this.$emit('refreshDataList', this.checkedRow)
// this.visible = false
// },
rowdbClick(row) {
this.checked = row.id
this.checkedRow = row
this.select();
},
rowClick(row) {
this.checked = row.id
this.checkedRow = row
},
init(excludeIdList, accountSubjectName, contractCodeList, accountState, type, businessType) {
this.visible = true
this.listLoading = true

@ -157,6 +157,7 @@
<el-button size="mini" type="text" :disabled="!scope.row.flowState"
@click="updateHandle(scope.row,scope.row.flowState)">详情</el-button>
<el-button size="mini" type="text" @click="downPayment(scope.row.id)"></el-button>
<el-button type="text" @click="closeCaseHandle(scope.row)" v-has="'btn_edit'">
<el-button type="text" v-if="scope.row.tableField113.length > 0 && scope.row.bfsFlag == 1" @click="uploadBFSHandle(scope.row.id)" v-has="'btn_edit'">BFS
</el-button>
<el-button type="text" @click="settlementHandle(scope.row)" v-has="'btn_edit'">
@ -230,6 +231,7 @@ import { getToken } from "@/utils/auth";
import JNPFForm from './settlementForm'
export default {
name: 'payment_application',
components: {
JNPFForm,
FlowBox,

@ -171,6 +171,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name: 'fuwushangzhongxin.kehuguanli',
components: {
FlowBox,
FlowBusinessConfigBox,

@ -171,6 +171,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name: 'gongyingshangzhongxin.kehuguanli',
components: {
FlowBox,
FlowBusinessConfigBox,

@ -91,8 +91,21 @@
</el-table-column>
<el-table-column prop="bomName" label="商品名称" align="center" min-width="120" fixed="left"
<el-table-column prop="bomName" label="BOM名称" align="center" min-width="200" fixed="left"
sortable>
<template #default="scope">
<el-row>
<el-col>
{{ scope.row.bomName }}
</el-col>
</el-row>
</template>
</el-table-column>
<el-table-column prop="productName" label="商品名称" align="center" min-width="180"
fixed="left" sortable>
<template #default="scope">
<el-row>
@ -102,6 +115,19 @@
</el-row>
</template>
</el-table-column>
<el-table-column prop="productCode" label="商品编码" align="center" min-width="230"
fixed="left" sortable>
<template #default="scope">
<el-row>
<el-col>
{{ scope.row.productCode }}
</el-col>
</el-row>
</template>
</el-table-column>
<el-table-column prop="productTypeId" label="类型" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.productTypeId }}
@ -197,6 +223,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name: 'bomliebiao',
components: {
FlowBox,
ExportBox, ToFormDetail, SuperQuery

@ -185,6 +185,7 @@ import superQueryJson from './superQueryJson'
import OrganizeSelect from '@/views/scm/publicPage/organizeSelectIndex'
export default {
name: 'businessLine',
components: {
FlowBox,
ExportBox, ToFormDetail, SuperQuery, OrganizeSelect

@ -179,6 +179,7 @@ import superQueryJson from './superQueryJson'
import UserMultipleSelect from '@/views/scm/publicPage/UserSelectIndex';
export default {
name: 'businessLineConfig',
components: {
FlowBox,
ExportBox, ToFormDetail, SuperQuery, UserMultipleSelect

@ -163,6 +163,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name: 'businessOrganize',
components: {
FlowBox,
ExportBox, ToFormDetail, SuperQuery

@ -79,6 +79,8 @@ import SonVue from '@/views/scm/businessline3/index.vue';
// import SonVue from './sonVue.vue';
export default {
name: 'gcjd',
components: {
FlowBox,
ExportBox, ToFormDetail, SuperQuery, FatherVue, SonVue

@ -267,6 +267,8 @@ import ClassTeamGoodsBox from '@/views/scm/publicPopup/ClassTeamGoodsBox'
import ClassTimeGoodsBox from '@/views/scm/publicPopup/ClassTimeGoodsBox'
export default {
name: 'classPlan',
components: { ClassTeamGoodsBox, ClassTimeGoodsBox },
props: [],
data() {

@ -38,9 +38,11 @@
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'" @click="addOrUpdateHandle()">
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="addOrUpdateHandle()">新增
</el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()" v-has="'btn_download'">
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()"
v-has="'btn_download'">导出
</el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-clearn" @click="handleBatchRemoveDel()"
v-has="'btn_batchRemove'">批量删除
@ -52,12 +54,14 @@
@click="openSuperQuery()" />
</el-tooltip>
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="initData()" />
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="initData()" />
</el-tooltip>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c custom-column border
@selection-change="handleSelectionChange" :span-method="arraySpanMethod">
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
custom-column border @selection-change="handleSelectionChange"
:span-method="arraySpanMethod">
<el-table-column prop="teamName" label="班组名称" align="center" sortable>
</el-table-column>
<el-table-column prop="timeNames" label="班次名称" align="center" sortable>
@ -91,8 +95,8 @@
</template>
</el-table-column> -->
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
<pagination :total="total" :page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize" @pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
@ -100,8 +104,10 @@
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible = false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson" @superQuery="superQuery" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail"
@close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@superQuery="superQuery" />
</div>
</template>
@ -124,6 +130,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name: 'paibanricheng',
components: {
JNPFForm,
Detail,

@ -298,6 +298,8 @@ import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
import { thousandsFormat } from "@/components/Generator/utils/index"
export default {
name: 'banzuguanli',
components: {},
props: [],
data() {

@ -130,6 +130,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name: 'banciguanli',
components: {
JNPFForm,
Detail,

@ -1989,6 +1989,8 @@ export default {
fncGetSubjectInterfaceId() {
switch (this.dataForm.contractType) {
case "1":
return "583692691678691653";
break;
case "2":
return "549863235596100037";
break;

@ -39,6 +39,10 @@
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()"
v-has="'btn_download'">导出
</el-button>
<!-- <el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="addContractList() ">合同关联
</el-button> -->
<!-- <el-button
type="text"
icon="icon-ym icon-ym-btn-clearn"
@ -162,6 +166,17 @@
</el-button>
<el-button size="mini" type="text" :disabled="!scope.row.flowState"
@click="updateHandle(scope.row, scope.row.flowState)">详情</el-button>
<el-button
v-if="scope.row.contractType == '采购合同' && scope.row.procurementModel == '以销定采' "
type="text" @click="addContractList(scope.row.id)" v-has="'btn_edit'">采购合同关联
</el-button>
<el-button
v-if="scope.row.contractType == '销售合同' && scope.row.procurementModel == '以采定销' "
type="text" @click="addContractList(scope.row.id)" v-has="'btn_edit'">销售合同关联
</el-button>
</template>
</el-table-column>
</JNPF-table>
@ -187,6 +202,8 @@
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible = false" />
<ContractList v-if="contractListVisible" ref="ContractList" @refresh="initData" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail"
@close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@ -213,14 +230,18 @@ import SuperQuery from "@/components/SuperQuery";
import superQueryJson from "./superQueryJson";
import JNPFFormSet from "../contractSetPriceFormula/form";
import dayjs from "dayjs";
import ContractList from '@/views/scm/contractLRelation/formContractBatch.vue'
export default {
name: 'contractL',
components: {
JNPFFormSet,
FlowBox,
ExportBox,
ToFormDetail,
SuperQuery
SuperQuery,
ContractList,
},
data() {
return {
@ -232,6 +253,7 @@ export default {
columnOptions: [],
mergeList: [],
exportList: [],
contractListVisible: false,
columnList,
superQueryVisible: false,
@ -253,6 +275,7 @@ export default {
listLoading: false,
multipleSelection: [],
total: 0,
multipleSelectionItem: [],
queryData: {},
listQuery: {
superQueryJson: "",
@ -343,6 +366,31 @@ export default {
this.fnDataSet();
},
methods: {
addContractList(id) {
debugger
// if (!this.multipleSelectionItem.length) {
// this.$message({
// type: 'error',
// message: '',
// duration: 1500,
// })
// return
// }
// const selectData = this.multipleSelectionItem
const selectData = id
const moshi = selectData[0].contractType;
const leixi = selectData[0].procurementModel;
this.contractListVisible = true
this.$nextTick(() => {
this.$refs.ContractList.initContractData(selectData)
})
},
fnDataSet() {
const query = {};
// -
@ -557,6 +605,7 @@ export default {
async initSearchData() { },
initData() {
this.listLoading = true;
this.contractListVisible = false;
let _query = {
...this.listQuery,
...this.query,
@ -607,6 +656,7 @@ export default {
});
},
handleSelectionChange(val) {
this.multipleSelectionItem = val
const res = val.map(item => item.id);
this.multipleSelection = res;
},

@ -0,0 +1,724 @@
<template>
<transition name="el-zoom-in-center">
<div class="JNPF-preview-main">
<div class="JNPF-common-page-header">
<el-page-header @back="goBack" :content="!dataForm.id ? '新建':'编辑'" />
<div class="options">
<el-dropdown class="dropdown" placement="bottom">
<el-button style="width:70px">
<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
<template v-if="dataForm.id">
<el-dropdown-item @click.native="prev" :disabled='prevDis'>
{{'上一条'}}
</el-dropdown-item>
<el-dropdown-item @click.native="next" :disabled='nextDis'>
{{'下一条'}}
</el-dropdown-item>
</template>
<el-dropdown-item type="primary" @click.native="dataFormSubmit(2)"
:loading="continueBtnLoading" :disabled='btnLoading'>
{{!dataForm.id ?'确定并新增':'确定并继续'}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading"
:disabled='continueBtnLoading'> </el-button>
<el-button @click="goBack"> </el-button>
</div>
</div>
<el-row :gutter="15" class=" main" :style="{margin: '0 auto',width: '100%'}">
<el-form ref="formRef" :model="dataForm" :rules="dataRule" size="small" label-width="100px"
label-position="right">
<template v-if="!loading">
<!-- 具体表单 -->
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="合同信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="合同名称" prop="contractName">
<JnpfInput v-model="dataForm.contractName" disabled="true"
@change="changeData('contractName', -1)" placeholder="请输入" clearable
:style="{ width: '100%' }">
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="合同编号" prop="contractNumber">
<JnpfInput v-model="dataForm.contractNumber" disabled="true"
@change="changeData('contractNumber', -1)" placeholder="请输入" clearable
:style="{ width: '100%' }">
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="对方合同编号" prop="contractNo">
<JnpfInput v-model="dataForm.contractNo" disabled="true"
@change="changeData('contractNo', -1)" placeholder="请输入" clearable
:style="{ width: '100%' }">
</JnpfInput>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="合同类型" prop="contractType">
<JnpfSelect v-model="dataForm.contractType" @change="changeData('contractType',-1)"
placeholder="请选择" clearable :style='{"width":"100%"}' disabled="true"
:options="contractTypeOptions" :props="contractTypeProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="8">
<jnpf-form-tip-item label="采购模式" prop="procurementModel">
<JnpfSelect v-model="dataForm.procurementModel"
@change="changeData('procurementModel',-1)" placeholder="请选择" clearable
:style='{"width":"100%"}' disabled="true" :options="procurementModelOptions"
:props="procurementModelProps">
</JnpfSelect>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item>
<JnpfGroupTitle content="关联信息" contentPosition="left">
</JnpfGroupTitle>
</jnpf-form-tip-item>
</el-col>
<el-col :span="24">
<jnpf-form-tip-item label-width="0">
<div class="JNPF-common-title">
<h2></h2>
</div>
<el-table :data="dataForm.contractRelationList" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column label="销售合同编码" prop="purchaseContractCode"
v-if="dataForm.procurementModel==1">
<template slot="header" v-if="false">
<span class="required-sign">*</span>销售合同编码
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.purchaseContractCode"
@change="changeData('voucherproduct-spec',scope.$index)" placeholder="请输入"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售合同名称" prop="purchaseContractName"
v-if="dataForm.procurementModel==1">
<template slot="header" v-if="false">
<span class="required-sign">*</span>销售合同名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.purchaseContractName"
@change="changeData('voucherproduct-remark',scope.$index)" placeholder="请输入"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="销售合同对方合同号" prop="purchaseContractNo"
v-if="dataForm.procurementModel==1">
<template slot="header" v-if="false">
<span class="required-sign">*</span>销售合同对方合同号
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.purchaseContractNo"
@change="changeData('voucherproduct-remark',scope.$index)" placeholder="请输入"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="采购合同编号" prop="purchaseContractCode"
v-if="dataForm.procurementModel==2">
<template slot="header" v-if="false">
<span class="required-sign">*</span>采购合同编号
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.purchaseContractCode"
@change="changeData('voucherproduct-remark',scope.$index)" placeholder="请输入"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="采购合同名称" prop="purchaseContractName"
v-if="dataForm.procurementModel==2">
<template slot="header" v-if="false">
<span class="required-sign">*</span>采购合同名称
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.purchaseContractName"
@change="changeData('voucherproduct-remark',scope.$index)" placeholder="请输入"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="采购合同对方合同号" prop="purchaseContractNo"
v-if="dataForm.procurementModel==2">
<template slot="header" v-if="false">
<span class="required-sign">*</span>采购合同对方合同号
</template>
<template slot-scope="scope">
<JnpfInput v-model="scope.row.purchaseContractNo"
@change="changeData('voucherproduct-remark',scope.$index)" placeholder="请输入"
clearable :style='{"width":"100%"}'>
</JnpfInput>
</template>
</el-table-column>
<el-table-column label="操作" width="50">
<template slot-scope="scope">
<el-button size="mini" type="text" class="JNPF-table-delBtn"
@click="delvoucherproductList(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="table-actions" @click="choice(dataForm.contractType)">
<el-button type="text" icon="el-icon-plus">添加</el-button>
</div>
</jnpf-form-tip-item>
</el-col>
<!-- 表单结束 -->
</template>
</el-form>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm"
ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false" />
<ContractList v-if="contractVisible" ref="contractListBox" @refreshDataList="initList" />
</el-row>
</div>
</transition>
</template>
<script>
import request from '@/utils/request'
import { mapGetters } from "vuex";
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import { getDefaultCurrentValueUserId } from '@/api/permission/user'
import { getDefaultCurrentValueDepartmentId } from '@/api/permission/organize'
import { getDateDay, getLaterData, getBeforeData, getBeforeTime, getLaterTime } from '@/components/Generator/utils/index.js'
import { thousandsFormat } from "@/components/Generator/utils/index"
import ContractList from '@/views/scm/publicPopup/ContractLBox'
export default {
components: { ContractList },
props: [],
data() {
return {
dataFormSubmitType: 0,
continueBtnLoading: false,
index: 0,
prevDis: false,
nextDis: false,
allList: [],
visible: false,
loading: false,
btnLoading: false,
formRef: 'formRef',
setting: {},
eventType: '',
userBoxVisible: false,
selectDialogVisible: false,
contractVisible: false,
currTableConf: {},
dataValueAll: {},
addTableConf: {
voucherProductBatchList: { "popupType": "dialog", "hasPage": true, "popupTitle": "选择数据", "pageSize": 20, "columnOptions": [], "interfaceId": "", "interfaceName": "", "relationOptions": [], "templateJson": [], "popupWidth": "800px" },
},
//
ableAll: {
},
tableRows: {
voucherProductBatchList: {
productId: '',
productIdOptions: [],
spec: '',
specOptions: [],
unit: '',
unitOptions: [],
grossWeight: '',
grossWeightOptions: [],
tareWeight: '',
tareWeightOptions: [],
buckleWeight: '',
buckleWeightOptions: [],
netWeight: '',
netWeightOptions: [],
remark: '',
remarkOptions: [],
printTime: '',
printTimeOptions: [],
receiptUnit: '',
receiptUnitOptions: [],
tenantId: '',
tenantIdOptions: [],
cargoIdOptions: [],
receiptNumOptions: [],
batchNo: '',
batchNoOptions: [],
deliveryUnit: [],
deliveryUnitOptions: [],
deliveryNum: [],
deliveryNumOptions: [],
enabledmark: undefined
},
},
Vmodel: "",
currVmodel: "",
dataForm: {
id: undefined,
contractName: undefined,
contractNumber: undefined,
contractNo: undefined,
contractType: undefined,
procurementModel: undefined,
contractRelationList: [],
version: 0,
},
tableRequiredData: {},
dataRule:
{
supplierId: [
{
required: true,
message: '请选择',
trigger: 'change'
},
],
customerId: [
{
required: true,
message: '请选择',
trigger: 'change'
},
],
},
contractTypeOptions: [{ "fullName": "采购合同", "id": "1" }, { "fullName": "销售合同", "id": "2" }],
contractTypeProps: { "label": "fullName", "value": "id" },
procurementModelOptions: [{ "fullName": "以销定采", "id": "1" }, { "fullName": "以采定销", "id": "2" }],
procurementModelProps: { "label": "fullName", "value": "id" },
voucherproductproductIdcolumnOptions: [{ "label": "商品编码", "value": "code" }, { "label": "商品名称", "value": "name" }, { "label": "规格", "value": "spec" },],
voucherproductprintTimecolumnOptions: [{ "label": "车牌号", "value": "vehicle_number" }, { "label": "驾驶员", "value": "name" }, { "label": "电话", "value": "mobile" }],
voucherproductcargoIdOptions: [{ "fullName": "公路", "id": "1" }, { "fullName": "铁路", "id": "2" }, { "fullName": "轮船", "id": "3" }, { "fullName": "空运", "id": "4" }, { "fullName": "无", "id": "5" }],
voucherproductcargoIdProps: { "label": "fullName", "value": "id" },
voucherproductreceiptNumOptions: [{ "fullName": "仓库承运(DC)", "id": "1" }, { "fullName": "承运商", "id": "2" }, { "fullName": "供应商", "id": "3" }, { "fullName": "自提", "id": "4" }],
voucherproductreceiptNumProps: { "label": "fullName", "value": "id" },
childIndex: -1,
isEdit: false,
interfaceRes: {
voucherType: [],
preparationTime: [],
deliveryType: [],
supplierId: [],
customerId: [],
documentType: [],
voucherStatus: [],
businessType: [],
voucherproductproductId: [],
voucherproductspec: [],
voucherproductunit: [],
voucherproductgrossWeight: [],
voucherproducttareWeight: [],
voucherproductbuckleWeight: [],
voucherproductnetWeight: [],
voucherproductremark: [],
voucherproductprintTime: [],
voucherproductreceiptUnit: [],
voucherproducttenantId: [],
voucherproductcargoId: [],
voucherproductreceiptNum: [],
voucherproductbatchNo: [],
voucherproductdeliveryUnit: [],
voucherproductdeliveryNum: [],
},
}
},
computed: {
...mapGetters(['userInfo'])
},
watch: {},
created() {
this.dataAll()
this.initDefaultData()
this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm))
},
mounted() { },
methods: {
//
initContractData(selectData) {
debugger
// const id = selectData[0].id
const id = selectData
if (!id) {
return
}
request({
url: `/api/scm/ContractL/relation/${id}`,
method: "Get",
// data: data
}).then(res => {
var Info = res.data;
this.dataForm.contractName = Info.contractName,
this.dataForm.contractNumber = Info.contractNumber,
this.dataForm.contractNo = Info.contractNo,
this.dataForm.contractType = Info.contractType,
this.dataForm.procurementModel = Info.procurementModel,
this.dataForm.id = Info.id,
this.dataForm.contractRelationList = Info.contractRelationList
})
},
choice(val) {
this.contractVisible = true
let excludeIdList = [];
for (let i = 0; i < this.dataForm.contractRelationList.length; i++) {
excludeIdList.push(this.dataForm.contractRelationList[i].purchaseContractCode);
}
this.$nextTick(() => {
this.$refs.contractListBox.init(excludeIdList, val)
})
},
initList(list) {
for (let i = 0; i < list.length; i++) {
const e = list[i];
let item = {
purchaseContractCode: e.contractNumber,
purchaseContractName: e.contractName,
purchaseContractNo: e.contractNo,
}
this.dataForm.contractRelationList.push(item)
}
},
prev() {
this.index--
if (this.index === 0) {
this.prevDis = true
}
this.nextDis = false
for (let index = 0; index < this.allList.length; index++) {
const element = this.allList[index];
if (this.index == index) {
this.getInfo(element.id)
}
}
},
next() {
this.index++
if (this.index === this.allList.length - 1) {
this.nextDis = true
}
this.prevDis = false
for (let index = 0; index < this.allList.length; index++) {
const element = this.allList[index];
if (this.index == index) {
this.getInfo(element.id)
}
}
},
getInfo(id) {
request({
url: '/api/scm/Voucher/' + id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
});
},
goBack() {
this.visible = false
this.$emit('refresh', true)
},
changeData(model, index) {
this.isEdit = false
this.childIndex = index
let modelAll = model.split("-");
let faceMode = "";
for (let i = 0; i < modelAll.length; i++) {
faceMode += modelAll[i];
}
for (let key in this.interfaceRes) {
if (key != faceMode) {
let faceReList = this.interfaceRes[key]
for (let i = 0; i < faceReList.length; i++) {
if (faceReList[i].relationField == model) {
let options = 'get' + key + 'Options';
if (this[options]) {
this[options]()
}
this.changeData(key, index)
}
}
}
}
},
changeDataFormData(type, data, model, index, defaultValue) {
if (!this.isEdit) {
if (type == 2) {
for (let i = 0; i < this.dataForm[data].length; i++) {
if (index == -1) {
this.dataForm[data][i][model] = defaultValue
} else if (index == i) {
this.dataForm[data][i][model] = defaultValue
}
}
} else {
this.dataForm[data] = defaultValue
}
}
},
dataAll() {
},
clearData() {
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll))
},
init(id, isDetail, allList) {
this.prevDis = false
this.nextDis = false
this.allList = allList || []
if (allList.length) {
this.index = this.allList.findIndex(item => item.id === id)
if (this.index == 0) {
this.prevDis = true
}
if (this.index == this.allList.length - 1) {
this.nextDis = true
}
} else {
this.prevDis = true
this.nextDis = true
}
this.dataForm.id = id || 0;
this.visible = true;
this.$nextTick(() => {
if (this.dataForm.id) {
this.loading = true
request({
url: '/api/scm/Voucher/' + this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)
this.loading = false
});
} else {
this.clearData()
this.initDefaultData()
}
});
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
},
//
initDefaultData() {
},
//
dataFormSubmit(type) {
this.dataFormSubmitType = type ? type : 0
// this.$refs['formRef'].validate((valid) => {
// if (valid) {
// if (!this.voucherproductExist()) return
// this.request()
// }
// })
this.request()
},
request() {
debugger
let _data = this.dataList()
// if (this.dataFormSubmitType == 2) {
// this.continueBtnLoading = true
// } else {
// this.btnLoading = true
// }
// debugger
let id = this.dataForm.id
request({
// url: '/api/scm/ContractL/batch/',
url: `/api/scm/ContractL/batch/${id}`,
method: 'put',
data: _data
}).then((res) => {
this.$message({
message: res.msg,
type: 'success',
duration: 1000,
onClose: () => {
if (this.dataFormSubmitType == 2) {
this.$nextTick(() => {
this.clearData()
this.initDefaultData()
})
this.continueBtnLoading = false
return
}
this.visible = false
this.btnLoading = false
this.$emit('refresh', true)
}
})
// this.$router.back(1)
})
},
addvoucherproductList() {
let item = {
productId: '',
spec: undefined,
unit: undefined,
grossWeight: undefined,
tareWeight: undefined,
buckleWeight: undefined,
netWeight: undefined,
freight: undefined,
vehicleId: '',
driverName: undefined,
poundCode: undefined,
modeTransport: '',
transportationMethod: '',
carrier: undefined,
placeDispatch: undefined,
destination: undefined,
}
this.getvoucherproductList(item)
},
delvoucherproductList(index) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.dataForm.contractRelationList.splice(index, 1);
}).catch(() => {
});
},
getvoucherproductList(value) {
let item = { ...this.tableRows.voucherProductBatchList, ...value }
this.dataForm.voucherProductBatchList.push(item)
this.childIndex = this.dataForm.voucherProductBatchList.length - 1
this.isEdit = true
this.isEdit = false
this.childIndex = -1
},
openSelectDialog(key) {
this.currTableConf = this.addTableConf[key]
this.currVmodel = key
this.selectDialogVisible = true
this.$nextTick(() => {
this.$refs.selectDialog.init()
})
},
addForSelect(data) {
for (let i = 0; i < data.length; i++) {
let t = data[i]
if (this['get' + this.currVmodel]) {
this['get' + this.currVmodel](t)
}
}
},
dateTime(timeRule, timeType, timeTarget, timeValueData, dataValue) {
let timeDataValue = null;
let timeValue = Number(timeValueData)
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValue
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = new Date().getTime()
} else if (timeType == 4) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getBeforeData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getBeforeTime(timeTarget, timeValue).getTime()
}
} else if (timeType == 5) {
let previousDate = '';
if (timeTarget == 1 || timeTarget == 2) {
previousDate = getDateDay(timeTarget, timeType, timeValue)
timeDataValue = new Date(previousDate).getTime()
} else if (timeTarget == 3) {
previousDate = getLaterData(timeValue)
timeDataValue = new Date(previousDate).getTime()
} else {
timeDataValue = getLaterTime(timeTarget, timeValue).getTime()
}
}
}
return timeDataValue;
},
time(timeRule, timeType, timeTarget, timeValue, formatType, dataValue) {
let format = formatType == 'HH:mm' ? 'HH:mm:00' : formatType
let timeDataValue = null
if (timeRule) {
if (timeType == 1) {
timeDataValue = timeValue || '00:00:00'
if (timeDataValue.split(':').length == 3) {
timeDataValue = timeDataValue
} else {
timeDataValue = timeDataValue + ':00'
}
} else if (timeType == 2) {
timeDataValue = dataValue
} else if (timeType == 3) {
timeDataValue = this.jnpf.toDate(new Date(), format)
} else if (timeType == 4) {
let previousDate = '';
previousDate = getBeforeTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
} else if (timeType == 5) {
let previousDate = '';
previousDate = getLaterTime(timeTarget, timeValue)
timeDataValue = this.jnpf.toDate(previousDate, format)
}
}
return timeDataValue;
},
dataList() {
var _data = this.dataForm;
return _data;
},
dataInfo(dataAll) {
let _dataAll = dataAll
this.dataForm = _dataAll
this.isEdit = true
this.dataAll()
for (let i = 0; i < _dataAll.voucherProductBatchList.length; i++) {
this.childIndex = i
}
this.childIndex = -1
},
},
}
</script>

@ -142,6 +142,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name: 'drivers',
components: {
JNPFForm,
Detail,

@ -163,6 +163,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name: 'energyConsumption',
components: {
FlowBox,
ExportBox, ToFormDetail, SuperQuery

@ -212,6 +212,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name: 'Operating expenses',
components: {
FlowBox,
ExportBox, ToFormDetail, SuperQuery

@ -177,6 +177,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name: 'cangchuzhongxin.kucunguanli',
components: {
JNPFForm,
Detail,

@ -5,8 +5,8 @@
<el-form @submit.native.prevent>
<el-col :span="6">
<el-form-item label="快照类型">
<JnpfSelect v-model="query.snapshotType" placeholder="请选择" clearable :options="snapshotTypeOptions"
:props="snapshotTypeProps">
<JnpfSelect v-model="query.snapshotType" placeholder="请选择" clearable
:options="snapshotTypeOptions" :props="snapshotTypeProps">
</JnpfSelect>
</el-form-item>
</el-col>
@ -45,7 +45,8 @@
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
<el-button type="text" icon="el-icon-arrow-down" @click="showAll = true" v-if="!showAll">
<el-button type="text" icon="el-icon-arrow-down" @click="showAll = true"
v-if="!showAll">
展开
</el-button>
<el-button type="text" icon="el-icon-arrow-up" @click="showAll = false" v-else>
@ -58,9 +59,11 @@
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<div>
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'" @click="addOrUpdateHandle()">
<el-button type="primary" icon="icon-ym icon-ym-btn-add" v-has="'btn_add'"
@click="addOrUpdateHandle()">新增
</el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()" v-has="'btn_download'">
<el-button type="text" icon="icon-ym icon-ym-btn-download" @click="exportData()"
v-has="'btn_download'">导出
</el-button>
<el-button type="text" icon="icon-ym icon-ym-btn-clearn" @click="handleBatchRemoveDel()"
v-has="'btn_batchRemove'">批量删除
@ -72,14 +75,16 @@
@click="openSuperQuery()" />
</el-tooltip>
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="initData()" />
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="initData()" />
</el-tooltip>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
@selection-change="handleSelectionChange" :span-method="arraySpanMethod" border custom-column show-summary
:summary-method="getTableSummaries">
<el-table-column prop="snapshotDate" label="快照日期" sortable align="center" width="150" fixed="left">
@selection-change="handleSelectionChange" :span-method="arraySpanMethod" border
custom-column show-summary :summary-method="getTableSummaries">
<el-table-column prop="snapshotDate" label="快照日期" sortable align="center" width="150"
fixed="left">
<template slot-scope="scope">
<template v-if="snapshotType == '1'">
{{ scope.row.snapshotDate | toDate("yyyy-MM-dd") }}
@ -89,7 +94,8 @@
</template>
</template>
</el-table-column>
<el-table-column prop="code" label="商品编码" sortable align="center" width="150" fixed="left">
<el-table-column prop="code" label="商品编码" sortable align="center" width="150"
fixed="left">
</el-table-column>
<el-table-column prop="name" label="商品名称" align="center" width="150" fixed="left">
</el-table-column>
@ -97,27 +103,32 @@
</el-table-column>
<el-table-column prop="warehouseName" label="仓库" align="center" width="150">
</el-table-column>
<el-table-column prop="storageAreaName" label="货区" align="center" width="150" v-if="query.searchDateType == 1 || query.searchDateType == 2">
<el-table-column prop="storageAreaName" label="货区" align="center" width="150"
v-if="query.searchDateType == 1 || query.searchDateType == 2">
</el-table-column>
<el-table-column prop="batchNumber" label="批次号" align="center" width="150" v-if="query.searchDateType == 1">
<el-table-column prop="batchNumber" label="批次号" align="center" width="150"
v-if="query.searchDateType == 1">
</el-table-column>
<el-table-column prop="inventoryNumberStartSum" label="期初库存" align="center" width="150">
</el-table-column>
<el-table-column prop="inventoryNumberStartAmount" label="期初金额" align="center" width="150">
</el-table-column>
<el-table-column prop="purchaseWarehousingNumberSum" label="采购入库数量" align="center" width="150">
<el-table-column prop="inventoryNumberStartAmount" label="期初金额" align="center"
width="150">
</el-table-column>
<el-table-column prop="purchaseWarehousingNumberSum" label="采购入库数量" align="center"
width="150">
</el-table-column>
<el-table-column prop="purchaseWarehousingNumberAmount" label="采购金额" align="center"
width="150">
</el-table-column>
<el-table-column prop="purchaseWarehousingNumberAmount" label="采购金额" align="center" width="150">
</el-table-column>
<el-table-column prop="inventoryNumberEndSum" label="期末库存" align="center" width="150">
</el-table-column>
<el-table-column prop="inventoryNumberEndAmount" label="期末金额" align="center" width="150">
</el-table-column>
<el-table-column prop="inventoryNumberEndAmount" label="期末金额" align="center" width="150">
</el-table-column>
<el-table-column prop="saleOutboundNumberSum" label="销售出库数量" align="center" width="150">
</el-table-column>
<el-table-column prop="saleOutboundNumberSumAmount" label="销售出库金额" align="center" width="150">
</el-table-column>
<el-table-column prop="saleOutboundNumberSumAmount" label="销售出库金额" align="center"
width="150">
</el-table-column>
<!-- <el-table-column prop="spec" label="商品规格" align="center" width="150">
</el-table-column>
@ -148,20 +159,19 @@
</template>
</el-table-column> -->
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
<pagination :total="total" :page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize" @pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<ImportBox v-if="uploadBoxVisible" ref="UploadBox" @refresh="initData" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible = false" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail" @close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson" @superQuery="superQuery" />
<ToFormDetail v-if="toFormDetailVisible" ref="toFormDetail"
@close="toFormDetailVisible = false" />
<SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
@superQuery="superQuery" />
</div>
</template>
@ -197,6 +207,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name: 'cangchuzhongxin.kucunkuaizhao',
components: {
JNPFForm,
Detail,

@ -99,6 +99,7 @@ import SuperQuery from '@/components/SuperQuery'
import superQueryJson from './superQueryJson'
export default {
name: 'gongxufenlei',
components: {
JNPFForm,
Detail,

@ -184,6 +184,7 @@ import SuperQuery from "@/components/SuperQuery";
import superQueryJson from "./superQueryJson";
export default {
name: 'productWarehouse',
components: {
FlowBox,
ExportBox,

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save