新增委托验收同步

master
anthonyywj2 3 years ago
parent 9a4d0a8aa5
commit edbaea7363

@ -23,6 +23,8 @@ public interface EntrustReceDao {
boolean deleteById(String id);
boolean deleteAll();
boolean updateEntrustRec(EntrustReceEntity warehouseEntity);
}

@ -13,6 +13,6 @@ public class SpsSyncBusResponse {
private List<BussinessTypeEntity> bussinessTypeEntities;
private List<BussinessOriginTypeEntity> bussinessOriginTypeEntities;
private List<SpsBusLoclTypeResponse> bussinessLocalTypeEntities;
private List<BussinessChangeTypeEntity> bussinessChangeTypeEntities;
private List<EntrustReceEntity> entrustReceEntities;
}

@ -28,4 +28,10 @@ public class SyncDataSetResponse {
private Integer syncDownloadTime; //定时下载时间
private boolean sysUser;
private Integer orderSyncTime;
private String orderSyncStart;
private String basicSyncStart;
private boolean entrustAction;
}

@ -22,6 +22,8 @@ public interface EntrustReceService {
boolean deleteById(String id);
boolean deleteAll();
boolean updateEntrustRec(EntrustReceEntity warehouseEntity);
}

@ -79,6 +79,11 @@ public class EntrustReceServiceImpl implements EntrustReceService {
return entrustReceDao.deleteById(id);
}
@Override
public boolean deleteAll() {
return entrustReceDao.deleteAll();
}
@Override
public boolean updateEntrustRec(EntrustReceEntity entrustReceEntity) {
return entrustReceDao.updateEntrustRec(entrustReceEntity);

@ -31,6 +31,7 @@ import com.glxp.api.admin.res.basic.SpsSyncDataResponse;
import com.glxp.api.admin.res.basic.SpsSyncOrderResponse;
import com.glxp.api.admin.service.basic.BasicDownloadService;
import com.glxp.api.admin.service.basic.BussinessChangeTypeService;
import com.glxp.api.admin.service.basic.EntrustReceService;
import com.glxp.api.admin.service.inout.OrderService;
import com.glxp.api.admin.service.inventory.InvWarehouseService;
import com.glxp.api.admin.service.thrsys.ThrInvWarehouseService;
@ -71,7 +72,8 @@ public class DlBasicService {
WarehouseUserDao warehouseUserDao;
@Resource
WarehouseBussinessTypeDao warehouseBussinessTypeDao;
@Resource
EntrustReceService entrustReceService;
@Resource
ThrInvWarehouseService thrInvWarehouseService;
@Resource
@ -373,6 +375,16 @@ public class DlBasicService {
logger.error(e.getMessage());
}
}
if (CollUtil.isNotEmpty(syncDataResponse.getEntrustReceEntities())) {
entrustReceService.deleteAll();
for (EntrustReceEntity entrustReceEntity : syncDataResponse.getEntrustReceEntities()) {
entrustReceEntity.setUpdateTime(null);
entrustReceService.insertEntrustRec(entrustReceEntity);
}
}
batchSession.close();
spGetHttp.postBasicStatus(basicExportStatusEntity.getId());

@ -139,6 +139,8 @@ public class HeartService {
logs = logs + "业务单据类型:" + spsSyncBusResponse.getBussinessLocalTypeEntities().size() + "条\n";
if (CollUtil.isNotEmpty(spsSyncBusResponse.getBussinessOriginTypeEntities()))
logs = logs + "第三方单据类型:" + spsSyncBusResponse.getBussinessOriginTypeEntities().size() + "条\n";
if (CollUtil.isNotEmpty(spsSyncBusResponse.getEntrustReceEntities()))
logs = logs + "委托验收设置:" + spsSyncBusResponse.getEntrustReceEntities().size() + "条\n";
basicExportStatusEntity2.setRemark(logs);
basicExportStatusEntity2.setUpdateTime(new Date());
basicExportService.updateExportStatus(basicExportStatusEntity2);

@ -212,6 +212,8 @@ public class UpBasicService {
BussinessOriginTypeService bussinessOriginTypeService;
@Resource
private BussinessChangeTypeService bussinessChangeTypeService;
@Resource
private EntrustReceService entrustReceService;
public SpsSyncBusResponse upAllBus(SpsSyncDataRequest spsSyncDataRequest) {
SpsSyncBusResponse spsSyncBusResponse = new SpsSyncBusResponse();
@ -258,6 +260,18 @@ public class UpBasicService {
List<BussinessOriginTypeEntity> bussinessOriginTypeEntities = bussinessOriginTypeService.filterList(bussinessOriginTypeFilterRequest);
spsSyncBusResponse.setBussinessOriginTypeEntities(bussinessOriginTypeEntities);
}
//委托验收
if (syncDataSetEntity.isEntrustAction()) {
BasicEntrustRecRequest basicEntrustRecRequest = new BasicEntrustRecRequest();
BeanUtils.copyProperties(spsSyncDataRequest, basicEntrustRecRequest);
List<EntrustReceEntity> dlEntrustReceEntities = entrustReceService.filterEntrustRec(basicEntrustRecRequest);
if (CollUtil.isNotEmpty(dlEntrustReceEntities)) {
List<EntrustReceEntity> temps = entrustReceService.filterEntrustRec(new BasicEntrustRecRequest());
spsSyncBusResponse.setEntrustReceEntities(temps);
}
}
return spsSyncBusResponse;
}

@ -25,6 +25,10 @@
<if test="curInv!=null">
and curInv = #{curInv}
</if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
</if>
</where>
order by updateTime desc
</select>
@ -54,6 +58,9 @@
<if test="userId!=null">
and basic_entrust_accept.userId = #{userId}
</if>
<if test="lastUpdateTime!=null and lastUpdateTime!=''">
<![CDATA[ and DATE_FORMAT(updateTime, '%Y-%m-%d %H:%i:%S')>= DATE_FORMAT(#{lastUpdateTime}, '%Y-%m-%d %H:%i:%S') ]]>
</if>
</where>
</select>
@ -96,9 +103,8 @@
<insert id="insertEntrustRec" keyProperty="id"
parameterType="com.glxp.api.admin.entity.basic.EntrustReceEntity">
replace
INTO basic_entrust_accept(id,`action`, entrustInv, `entrustUser`, userId, updateTime, remark,entrustAction,finishRece,curInv)
INTO basic_entrust_accept(`action`, entrustInv, `entrustUser`, userId, updateTime, remark,entrustAction,finishRece,curInv)
values (
#{id},
#{action},
#{entrustInv},
#{entrustUser},
@ -132,4 +138,11 @@
WHERE id = #{id}
</delete>
<delete id="deleteAll" parameterType="Map">
DELETE
FROM basic_entrust_accept
</delete>
</mapper>
Loading…
Cancel
Save