接口修改

jg-waiwang-pro
vayne 3 months ago
parent 8b7d14b5a1
commit 2d3acff426

@ -156,78 +156,14 @@
'' 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,
concat(ab.code,'-',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 ab ON aa.batch_number = ab.batch_number AND ab.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
LEFT JOIN base_organize e ON a.company_id = e.f_id AND e.f_delete_mark IS NULL
LEFT JOIN base_organize f ON a.department_id = f.f_id AND f.f_delete_mark IS NULL
LEFT JOIN base_user g ON a.f_creator_user_id = g.f_id AND g.f_delete_mark IS NULL
LEFT JOIN jg_contract h ON c.contract_id = h.id AND h.f_delete_mark IS NULL
LEFT JOIN jg_business_cargo i ON aa.outbound_area_id = i.id AND i.f_delete_mark IS NULL
LEFT JOIN jg_product j ON aa.product_id = j.id AND j.f_delete_mark is null
LEFT JOIN base_user k ON a.f_last_modify_user_id = k.f_id AND k.f_delete_mark IS NULL
LEFT JOIN jg_delivery_order l on a.warehousing_id = l.id and l.f_delete_mark is null
LEFT JOIN jg_business_order m on l.business_id = m.id and m.f_delete_mark is null
LEFT JOIN jg_business_order_product_relational n on c.id = n.business_order_id and n.f_delete_mark is null and aa.product_id = n.product_id and aa.outbound_unit = n.sales_main_unit_id and aa.ord_ln = n.ord_ln
LEFT JOIN jg_business_order_product_relational o on m.id = o.business_order_id and o.f_delete_mark is null and aa.product_id = o.product_id and aa.outbound_unit = o.sales_main_unit_id and aa.ord_ln = o.ord_ln
LEFT JOIN jg_contract p ON m.contract_id = p.id AND p.f_delete_mark IS NULL
LEFT JOIN jg_subject_basic q ON m.first_subject_basic_id = q.id AND q.f_delete_mark IS NULL
LEFT JOIN jg_business_order r ON a.business_order_no = r.code AND r.f_delete_mark is null
LEFT JOIN jg_contract s ON r.contract_id = s.id AND s.f_delete_mark is null
WHERE
a.f_delete_mark is null
AND a.id = #{id}
</select>
<select id="saleOutBoundByYunGuan2" resultType="jnpf.model.yunguan.YunguanSaleOutBoundModel">
SELECT
a.id AS OUT_ID,
e.f_en_code AS COMP_ID,
f.f_en_code AS DEPT_ID,
a.document_no AS PROD_ZL,
aa.order_line as CK_ORDER,
IF(a.warehousing_outbound_type = 1,c.code,m.code) as SAL_ORDER,
IF(a.warehousing_outbound_type = 1,d.code,q.code) as CUS_ID,
IF(a.warehousing_outbound_type = 1,d.name,q.name) as CUS_NAME,
i.cargo_name AS STORE_ID,
a.warehousing_time as OUT_DTM,
a.remark as REMARKS,
j.CODE AS MAT_ID,
j.NAME AS MAT_NAME,
aa.spec AS SPECIFICATION,
aa.outbound_unit AS UNIT,
aa.outbound_number AS OUT_QUANTITY,
'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,
k.f_real_name as MODIFY_EMP_ID,
a.f_last_modify_time as MODIFY_DTM,
'0' as CANCLE_YN,
'1' as OUT_TYPE,
'N' as READ_FLAG,
null as READ_TIME,
'' as ERR_MESSAGE,
'N' as ESB_STATUS,
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,
concat(ac.business_order_no,'-',LPAD(ab.ord_ln,3,0)) as PUR_ORDER
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

@ -36,8 +36,6 @@ public interface WarehousingOutboundMapper extends BaseMapper<WarehousingOutboun
//运管销售出库
List<YunguanSaleOutBoundModel> saleOutBoundByYunGuan(@Param("id") String id);
//运管销售出库第二选择
List<YunguanSaleOutBoundModel> saleOutBoundByYunGuan2(@Param("id") String id);
//// 运管销售出库商品
// List<YunguanSaleOutBoundModel> saleOutBoundProductByYunGuan(@Param("id") String id);

@ -67,7 +67,4 @@ public interface WarehousingOutboundService extends IService<WarehousingOutbound
//运管销售出库
List<YunguanSaleOutBoundModel> saleOutBoundByYunGuan(String id);
//运管销售出库第二选择
List<YunguanSaleOutBoundModel> saleOutBoundByYunGua2(String id);
}

@ -1091,8 +1091,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;
}
@ -1167,8 +1178,19 @@ public class CwsettlementServiceImpl extends ServiceImpl<CwsettlementMapper, Cws
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;
}
@ -1255,8 +1277,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;
}
@ -1332,8 +1365,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;
}

@ -922,6 +922,7 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl<WarehousingOutbo
entity.setErpMark("N");
entity.setErpMassage("ESB返回为空");
}
this.saveOrUpdate(entity);
}
}
}
@ -945,9 +946,4 @@ public class WarehousingOutboundServiceImpl extends ServiceImpl<WarehousingOutbo
public List<YunguanSaleOutBoundModel> saleOutBoundByYunGuan(String id) {
return warehousingOutboundMapper.saleOutBoundByYunGuan(id);
}
@Override
public List<YunguanSaleOutBoundModel> saleOutBoundByYunGua2(String id) {
return warehousingOutboundMapper.saleOutBoundByYunGuan2(id);
}
}

@ -968,17 +968,15 @@ 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());
}
entity.setErpMark(purchaseCode.get("code").toString());
entity.setErpMassage(purchaseCode.get("errmsg").toString());
}else{
entity.setErpMark("N");
entity.setErpMassage("ESB返回为空");
}
this.saveOrUpdate(entity);
}
}
this.saveOrUpdate(entity);
}

@ -1619,19 +1619,6 @@ public class BusinessOrderController {
return ActionResult.fail("推送失败");
}
}
//销售出库接口第二选择
else{
List<YunguanSaleOutBoundModel> yunguanSaleOutBoundModelList2 = warehousingOutboundService.saleOutBoundByYunGua2(id);
if (yunguanSaleOutBoundModelList2 != null && yunguanSaleOutBoundModelList2.size()>0) {
JSONObject saleCode = HttpUtil.httpRequest("http://172.16.1.50:8020/fggj/sal/stoOurRecs", "POST", JsonUtil.getObjectToString(yunguanSaleOutBoundModelList2));
if (ObjectUtil.isNotEmpty(saleCode) && saleCode.get("code").equals("200")){
return ActionResult.success("推送成功");
}else {
return ActionResult.fail("推送失败");
}
}
}
} else if (type.equals("5")) { //生产加工接口
List<YunguanProductProcessModel> yunguanProductProcessModelList = workOrderService.queryWorkOrderProductByYunguan(id);
List<YunguanProductProcessModel> yunguanProductProcessModelList1 = workOrderService.queryWorkOrderPrimaryByYunguan(id);

@ -664,35 +664,14 @@ public class CwsettlementController {
boolean headFlag = cwsettlementService.pushSaleHeadYunguan(cwsettlementEntity);
if(headFlag){
boolean lineFlag = cwsettlementService.pushSaleLineYunguan(cwsettlementEntity);
if (lineFlag){
// entity.setErpMark(saleCode.get("code").toString());
// entity.setErpMassage(saleCode.get("errmsg").toString());
}else {
entity.setErpMark("N");
entity.setErpMassage("ESB返回为空");
}
}else {
entity.setErpMark("N");
entity.setErpMassage("ESB返回为空");
}
}else{
//采购
boolean headFlag = cwsettlementService.pushPurchaseHeadYunguan(cwsettlementEntity);
if(headFlag){
boolean lineFlag = cwsettlementService.pushPurchaseLineYunguan(cwsettlementEntity);
if (lineFlag){
// entity.setErpMark(saleCode.get("code").toString());
// entity.setErpMassage(saleCode.get("errmsg").toString());
}else {
entity.setErpMark("N");
entity.setErpMassage("ESB返回为空");
}
} else {
entity.setErpMark("N");
entity.setErpMassage("ESB返回为空");
}
}
cwsettlementService.saveOrUpdate(cwsettlementForm,id,false);
}
}
}catch(Exception e){

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

@ -204,7 +204,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.flowState == 2 && 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>

@ -261,7 +261,7 @@
@click="handleDelVoucher(scope.row.id)">删除
</el-button>
<!-- <template v-if="scope.row.flowState == '2' && 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.id)"></el-button>
</template> -->
</template>
@ -522,7 +522,7 @@ export default {
})
},
inBoundNotice(row) {
// if (row.yunguanMark !== 'Y') {
// if (row.erpMark != '200') {
// this.$message({
// type: 'error',
// message: '',

@ -1789,7 +1789,7 @@ export default {
);
},
getPurchaseOrder(val, val2) {
// if (val2.yunguanMark != 'Y') {
// if (val2.erpMark != '200') {
// this.dataForm.businessId = undefined
// this.$message({
// message: '',
@ -1809,11 +1809,11 @@ export default {
val2.businessOrderProductRelationalList.forEach((item, index) => {
this.productIdList.push(item.productId);
item.orderNo = item.ordLn;
item.productName = item.name
item.saleNum = item.businessNum
item.deliveryUnit = item.salesMainUnitId
item.returnUnit = item.businessPrice
item.businessType = "1"
item.productName = item.name;
item.saleNum = item.businessNum;
item.deliveryUnit = item.salesMainUnitId;
item.returnUnit = item.businessPrice;
item.businessType = "1";
});
this.dataForm.deliveryProductRelationList = val2.businessOrderProductRelationalList;
this.productByOrderList = val2.businessOrderProductRelationalList;

@ -212,7 +212,7 @@
@click="handleDelVoucher(scope.row.id)">删除
</el-button>
<!-- <template v-if="scope.row.flowState == '2' && 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.id)"></el-button>
</template> -->
</template>
@ -435,7 +435,7 @@ export default {
})
},
outBoundNotice(row) {
// if (row.yunguanMark !== 'Y') {
// if (row.erpMark != '200') {
// this.$message({
// type: 'error',
// message: '',

@ -151,7 +151,7 @@
</el-button>
<el-button size="mini" type="text" :disabled="!scope.row.flowState"
@click="updateHandle(scope.row,scope.row.flowState)">详情</el-button>
<!-- <template v-if="scope.row.flowState == '2' && 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.id)"></el-button>
</template> -->
</template>

@ -157,7 +157,7 @@
</el-button>
<el-button size="mini" type="text" :disabled="!scope.row.flowState"
@click="updateHandle(scope.row,scope.row.flowState)">详情</el-button>
<!-- <template v-if="scope.row.flowState == '2' && 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.id)"></el-button>
</template> -->
</template>

@ -167,7 +167,7 @@
</el-button>
<el-button size="mini" type="text" :disabled="!scope.row.flowState"
@click="updateHandle(scope.row, scope.row.flowState)">详情</el-button>
<!-- <template v-if="scope.row.flowState == '2' && 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.id)"></el-button>
</template> -->
</template>
@ -590,7 +590,7 @@ export default {
},
addOstarts(row, status) {
// if (row.yunguanMark !== 'Y') {
// if (row.erpMark != '200') {
// this.$message({
// type: 'error',
// message: '',
@ -652,7 +652,7 @@ export default {
},
addOstartsRescind(row, status) {
// if (row.yunguanMark !== 'Y') {
// if (row.erpMark != '200') {
// this.$message({
// type: 'error',
// message: '',
@ -703,7 +703,7 @@ export default {
},
addOrUpdateHandleOver(row, isDetail) {
// if (row.yunguanMark !== 'Y') {
// if (row.erpMark != '200') {
// this.$message({
// type: 'error',
// message: '',

Loading…
Cancel
Save