对接吉客云代码
This commit is contained in:
parent
e91f79a6ec
commit
31f9aa0f3d
|
@ -143,16 +143,18 @@
|
|||
<!-- 查询 采用==查询 -->
|
||||
<select id="entity_list_base_group" resultMap="get-entity-result" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInDetailEntity">
|
||||
select
|
||||
goodsNo,goodsName,unitName,sum(quantity) as quantity,sum(transHasTaxAmount) as transHasTaxAmount,taxRate
|
||||
goodsNo,goodsName,unitName,
|
||||
SUM(CAST(quantity AS DECIMAL(10, 6))) AS quantity,
|
||||
SUM(CAST(transHasTaxAmount AS DECIMAL(10, 6))) AS transHasTaxAmount
|
||||
from jeck_goodsdocin_details
|
||||
where recId in (
|
||||
<foreach collection="goodsdocInEntityList" separator=";" item="item">
|
||||
where mainId in (
|
||||
<foreach collection="goodsdocInEntityList" separator="," item="item">
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="item.recId != null and item.recId !='' "> #{item.recId},</if>
|
||||
</trim>
|
||||
</foreach>
|
||||
)
|
||||
group by goodsNo,goodsName,unitName,taxRate
|
||||
group by goodsNo,goodsName,unitName
|
||||
</select>
|
||||
|
||||
<!-- 查询 采用==查询 -->
|
||||
|
|
|
@ -171,7 +171,7 @@
|
|||
where warehouseName = '退货仓'
|
||||
and state is null
|
||||
and goodsdocNo in (
|
||||
<foreach collection="groupList" separator=";" item="item">
|
||||
<foreach collection="groupList" separator="," item="item">
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="item.goodsdocNo != null and item.goodsdocNo !='' "> #{item.goodsdocNo},</if>
|
||||
</trim>
|
||||
|
@ -446,13 +446,13 @@
|
|||
<update id="entity_update" parameterType="com.hzya.frame.Jackyun.goodsdocin.entity.GoodsdocInEntity">
|
||||
update jeck_goodsdocin set
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="state != null and state !='' "> #{state} ,</if>
|
||||
<if test="u8BillCode != null and u8BillCode !='' "> #{u8BillCode}</if>
|
||||
<if test="state != null and state !='' ">state= #{state} ,</if>
|
||||
<if test="u8BillCode != null and u8BillCode !='' "> u8BillCode=#{u8BillCode}</if>
|
||||
</trim>
|
||||
where recId in (
|
||||
<foreach collection="groupList" separator=";" item="item">
|
||||
where goodsdocNo in (
|
||||
<foreach collection="groupList" separator="," item="item">
|
||||
<trim suffix="" suffixOverrides=",">
|
||||
<if test="item.recId != null and item.recId !='' "> #{recId},</if>
|
||||
<if test="item.goodsdocNo != null and item.goodsdocNo !='' "> #{item.goodsdocNo},</if>
|
||||
</trim>
|
||||
</foreach>
|
||||
)
|
||||
|
|
|
@ -208,7 +208,10 @@ public class GoodsdocInServiceImpl extends BaseService<GoodsdocInEntity,String>
|
|||
U8ResultEntity u8ResultOut =saleOutService.addSaleOutT(saleOut);
|
||||
if(!u8ResultOut.issuccess()){
|
||||
goodsdocInEntity.setState("N");
|
||||
}else{
|
||||
goodsdocInEntity.setState("Y");
|
||||
}
|
||||
goodsdocInEntity.setGroupList(goodsdocInEntityList);
|
||||
goodsdocInDao.updateGoodsdocIn(goodsdocInEntity);
|
||||
}
|
||||
}
|
||||
|
@ -229,17 +232,22 @@ public class GoodsdocInServiceImpl extends BaseService<GoodsdocInEntity,String>
|
|||
jsonObject.put("billid", "123");
|
||||
JSONObject head = new JSONObject();
|
||||
head.put("cbuscode", goodsdocInEntity.getU8BillCode());//发货单号
|
||||
head.put("cdepcode", "普通销售");//部门编码
|
||||
head.put("cdepcode", "00702");//todo 部门编码
|
||||
head.put("cmaker", "吉客云入库单自动生成");//创建人
|
||||
head.put("crdcode", "203");//入库类别编码
|
||||
head.put("cdepcode", "01001");//仓库编码 todo 正式需要切换为04009
|
||||
head.put("cwhcode", "01001");//仓库编码 todo 正式需要切换为04009
|
||||
head.put("ddate", "2024-12-31");//销售类型
|
||||
// head.put("ccuscode", "99999994");//todo 正式需要切换未这个客户
|
||||
head.put("ccuscode", "01010918");//客户
|
||||
jsonObject.put("head",head);
|
||||
JSONArray body = new JSONArray();
|
||||
int i = 0;
|
||||
if(CollectionUtils.isNotEmpty(goodsdocInDetailEntityList)){
|
||||
for(GoodsdocInDetailEntity item : goodsdocInDetailEntityList){
|
||||
i++;
|
||||
if("501010323".equals(item.getGoodsNo())){
|
||||
continue;
|
||||
}
|
||||
JSONObject details = new JSONObject();
|
||||
details.put("cbdlcode",goodsdocInEntity.getU8BillCode());//发货单号
|
||||
details.put("cdblrowno", i);//行号
|
||||
|
@ -258,9 +266,12 @@ public class GoodsdocInServiceImpl extends BaseService<GoodsdocInEntity,String>
|
|||
jsonObject.put("billid", "123");
|
||||
JSONObject head = new JSONObject();
|
||||
head.put("brdflag", "1");//发货0,退货1
|
||||
head.put("breturnflag", "1");//发货0,退货1
|
||||
head.put("cbustype", "普通销售");//
|
||||
head.put("cdepcode", "00702");//销售部门
|
||||
head.put("cmaker", "吉客云入库单自动生成");//创建人
|
||||
// head.put("ccuscode", "99999994");//todo 正式需要切换未这个客户
|
||||
head.put("ccuscode", "01010918");//客户
|
||||
head.put("cstcode", "11");//销售类型
|
||||
head.put("ddate", "2024-12-31");//销售类型
|
||||
jsonObject.put("head",head);
|
||||
|
|
|
@ -872,7 +872,6 @@ public class DeliveryOrderServiceImpl extends BaseService<DeliveryOrderEntity,St
|
|||
String updateMain = "update "+AccCode+".dbo.DispatchList set cCloser = '"+ccloser+"', bSettleAll = 1 where cDLCode = '"+cdlcode+"'";
|
||||
String updatebody = "update "+AccCode+".dbo.Dispatchlists set cSCloser = '"+ccloser+"',bSettleAll = 1 where DLID = '"+dt.getString("DLID")+"'";
|
||||
saleInvDao.execUpdateSql(updateMain,erdt);
|
||||
saleInvDao.execUpdateSql(updatebody,erdt);
|
||||
} catch (Exception e) {
|
||||
logger.info("关闭失败:"+e.getMessage());
|
||||
return BaseU8Result.getFailureMessageEntity("关闭失败,请联系U8管理员");
|
||||
|
|
Loading…
Reference in New Issue