物流周转

master
yangwl 3 years ago
parent ec03738f92
commit f2fc8f8964

@ -18,6 +18,8 @@ import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@ -279,6 +281,42 @@ public class AbnormalBillController {
}catch(Exception e){
return R.failed("检索失败:"+e.getMessage());
}
}
@GetMapping("/backLogDevice")
public R backLogDevice(AbnormalBillDto abnormalBillDto){
try{
return R.ok(abnormalBillService.backLogByDeviceUser(abnormalBillDto));
}catch(Exception e){
return R.failed("检索失败:"+e.getMessage());
}
}
@ResponseBody
@PostMapping("/saveDevice")
public R saveDevice(@RequestBody List<AbnormalBillDto> abnormalBillList) {
Boolean flag;
StringBuffer message = new StringBuffer();
List<AbnormalBill> abnormalBills=new ArrayList<>();
try {
for (AbnormalBillDto ab:abnormalBillList) {
AbnormalBill abnormalBill = new AbnormalBill();
abnormalBill.setHandle("AbnormalBillBo:1000,"+ab.getAbnormalNo());
abnormalBill.setUserConTime(LocalDateTime.now());
abnormalBill.setUserIsCon("true");
abnormalBills.add(abnormalBill);
}
flag=abnormalBillService.updateBatchById(abnormalBills);
} catch (Exception e) {
return R.failed(e.getMessage());
}
if (flag) {
message.insert(0, "确认维修成功");
return R.ok(message.toString());
} else {
message.insert(0, "确认维修失败:");
return R.failed(message.toString());
}
}
@ -294,9 +332,10 @@ public class AbnormalBillController {
}catch (Exception e){
return R.failed("检索失败:"+e.getMessage());
}
}
/**
*
*/

@ -254,10 +254,28 @@ public class AbnormalBill extends Model<AbnormalBill> {
@TableField(exist = false)
private String fileNum;
@TableField("USER_CON_TIME")
private LocalDateTime userConTime;
@TableField("USER_IS_CON")
private String userIsCon;
public LocalDateTime getUserConTime() {
return userConTime;
}
public void setUserConTime(LocalDateTime userConTime) {
this.userConTime = userConTime;
}
public String getHandle() {
public String getUserIsCon() {
return userIsCon;
}
public void setUserIsCon(String userIsCon) {
this.userIsCon = userIsCon;
}
public String getHandle() {
return handle;
}

@ -69,6 +69,15 @@ public interface AbnormalBillService extends IService<AbnormalBill> {
*/
List<AbnormalBillDto> backLog(AbnormalBillDto abnormalBillDto);
/**
*
* @param abnormalBillDto
* @return
*/
List<AbnormalBillDto> backLogByDeviceUser(AbnormalBillDto abnormalBillDto);
/**
* **
*/

@ -449,6 +449,16 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
return abnormalBillMapper.backLog(abnormalBillDto, language,userGroupList);
}
@Override
public List<AbnormalBillDto> backLogByDeviceUser(AbnormalBillDto abnormalBillDto) {
String user = CommonMethods.getUser();
String site = CommonMethods.getSite();
List<UserGroup> userGroupList = userGroupMapper.findUserGroupListByUser(site, user);
abnormalBillDto.setCreatedUser(user);
String language = LocaleContextHolder.getLocale().getLanguage();
return abnormalBillMapper.backLog(abnormalBillDto, language,userGroupList);
}
@Override
public AbnormalBillDisposeDto findAllByAbnormalNo(AbnormalBill abnormalBill) {
String site = CommonMethods.getSite();
@ -1216,7 +1226,7 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
//给设备处发企业微信消息
//给生产组
List<NwaUser> nwaUsers_sc = nwaUserService.checkUserGroup(site,"SBYCSB-SHENGCHAN");
List<NwaUser> nwaUsers_sc = nwaUserService.checkUserGroup(site,"ZHANGHAN");
if(nwaUsers_sc != null && nwaUsers_sc.size() <= 0){
throw new BaseException("消息发送失败,生产用户组下面没有用户");
@ -1254,8 +1264,10 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
sendUsers_sc.append(customFieldByUserId_sc.get(i)).append("|");
}
}
if (abnormalBill.getType().equals("S")){
activeMQUtil.wechatSendMessage(sendUsers_sc.toString(),abnormalMessage.getContent());
}
activeMQUtil.wechatSendMessage(sendUsers_sc.toString(),abnormalMessage.getContent());
activeMQUtil.wechatSendMessage(sendUsers.toString(),abnormalMessage.getContent());
}

@ -391,7 +391,7 @@ public class AbnormalPlanServiceImpl extends ServiceImpl<AbnormalPlanMapper, Abn
//计划物料不能为空 为返修物料
String plannedItem = repairshopOrder.getPlannedItemBo();
// String plannedBom = repairshopOrder.getPlannedBomBo();
String plannedBom = repairshopOrder.getPlannedBomBo();
// plannedBom = StringUtil.notBlank(plannedBom) ? plannedBom : shopOrder;
//计划工艺路线为 工艺维护的返修工艺路线
String plannedRouter = repairshopOrder.getRouterBo();
@ -419,11 +419,11 @@ public class AbnormalPlanServiceImpl extends ServiceImpl<AbnormalPlanMapper, Abn
}
// String plannedItemBo = HandleEnum.ITEM.getHandle(site, plannedItem, "A");
// String plannedBomBo = HandleEnum.BOM.getHandle(site, plannedBom, bomType, "#");
String plannedBomBo = HandleEnum.BOM.getHandle(site, plannedBom, bomType, "#");
String plannedRouterBo = HandleEnum.ROUTER.getHandle(site, plannedRouter, routerType, "#");
request.setPlannedItemRef(plannedItem);
// request.setPlannedBomRef(plannedBomBo);
request.setPlannedBomRef(plannedBomBo);
request.setPlannedRouterRef(plannedRouterBo);
request.setPriority(new BigDecimal(500));
request.setQuantityOrdered(new BigDecimal(repairshopOrder.getQtyOrdered()));

@ -48,6 +48,9 @@
<result column="STEP_ID" property="stepId" />
<result column="WORK_ORDER" property="workOrder" />
<result column="ITEM_NUMBER" property="itemNumber" />
<result column="USER_CON_TIME" property="userConTime" />
<result column="USER_IS_CON" property="userIsCon" />
</resultMap>
<resultMap id="abnormalBillDto" type="com.foreverwin.mesnac.anomaly.dto.AbnormalBillDto" extends="BaseResultMap">
@ -729,6 +732,8 @@
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
<if test="et.workOrder!=null">WORK_ORDER=#{et.workOrder},</if>
<if test="et.itemNumber!=null">ITEM_NUMBER=#{et.itemNumber},</if>
<if test="et.userConTime!=null">USER_CON_TIME=#{et.userConTime},</if>
<if test="et.userIsCon!=null">USER_IS_CON=#{et.userIsCon},</if>
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
</update>
@ -974,13 +979,13 @@
<select id="backLog" resultMap="abnormalBillDto">
SELECT ROW_NUMBER() OVER(ORDER BY ZAB.ABNORMAL_NO ASC) SEQ,ZAB.ABNORMAL_NO ABNORMAL_NO,
CASE WHEN ZAB.CORRECTION = 'true' AND ZAB.PROGRAM = 'true' AND ZAB.STATUS != 'G' THEN '纠防确认,方案确认'
ELSE ZAB.STATUS
END STATUS ,
CASE WHEN ZAB.USER_IS_CON = 'true'THEN '是'
WHEN ZAB.USER_IS_CON = 'false' THEN '否'
END USER_IS_CON ,
IT.DESCRIPTION ITEM_DESCRIPTION, ZAB.CREATED_DATE_TIME CREATED_DATE_TIME,
ZAB.RESPONSE_DATE_TIME RESPONSE_DATE_TIME,
ZNU.FULL_NAME CREATED_USER,
ZAB.NC_CODE NC_CODE,ZAB.PB_DESCRIPTION PB_DESCRIPTION,
ZAB.NC_CODE NC_CODE,ZAB.PB_DESCRIPTION PB_DESCRIPTION,ZAB.USER_CON_TIME,
LISTAGG(NCT.DESCRIPTION , ',') WITHIN GROUP(ORDER BY ZAB.ABNORMAL_NO) NC_CODE_DESCRIPTION
FROM Z_ABNORMAL_BILL ZAB
LEFT JOIN Z_ABNORMAL_BILL_DISPOSE ZABD ON ZABD.ABNORMAL_BILL_BO = ZAB.HANDLE
@ -998,6 +1003,9 @@
<if test="abnormalBill.site != null and abnormalBill.site != ''">
zab.SITE = #{abnormalBill.site}
</if>
<if test="abnormalBill.createdUser != null and abnormalBill.createdUser != ''">
zab.CREATED_USER = #{abnormalBill.createdUser}
</if>
<if test="abnormalBill.checkUsr != null and abnormalBill.checkUsr != ''">
AND CFA.VALUE = #{abnormalBill.checkUsr}
</if>
@ -1096,7 +1104,7 @@
</if>
</where>
GROUP BY zab.ABNORMAL_NO,it.DESCRIPTION,zab.CREATED_DATE_TIME,zab.RESPONSE_DATE_TIME,
ZNU.FULL_NAME,zab.NC_CODE,zab.PB_DESCRIPTION,ZAB.CORRECTION,ZAB.PROGRAM,ZAB.STATUS
ZNU.FULL_NAME,zab.NC_CODE,zab.PB_DESCRIPTION,ZAB.CORRECTION,ZAB.PROGRAM,ZAB.STATUS,ZAB.USER_IS_CON,ZAB.USER_CON_TIME
ORDER BY zab.CREATED_DATE_TIME DESC
</select>

@ -457,64 +457,61 @@ public class SfcDispatchServiceImpl extends ServiceImpl<SfcDispatchMapper, SfcDi
continue;
}
sfcDispatch.setHandle(handle);
//是否导入
sfcDispatch.setIsImport(Constants.BOOL_TRUE);
//导入的是人员名称-查找人员编号,设备
String employee = "";
String employeeDescription = sfcDispatchDto.getEmployeeDescription();
if (StringUtil.notBlank(employeeDescription)) {
String _employeeDescription;
String []employeeDescriptionArray = employeeDescription.split(",");
employeeArray = new String[employeeDescriptionArray.length];
for (int i = 0; i < employeeDescriptionArray.length; i++) {
_employeeDescription = employeeDescriptionArray[i];
List<NwaUser> _list = userMap.get(_employeeDescription);
if (_list != null && _list.size() > 0) {
String userName = _list.get(0).getUserName();
employee += (i == 0) ? userName : "," + userName;
employeeArray[i] = userName;
}
}
sfcDispatch.setHandle(handle);
//是否导入
sfcDispatch.setIsImport(Constants.BOOL_TRUE);
//导入的是人员名称-查找人员编号,设备
String employee = "";
String employeeDescription = sfcDispatchDto.getEmployeeDescription();
if (StringUtil.notBlank(employeeDescription)) {
String _employeeDescription;
String []employeeDescriptionArray = employeeDescription.split(",");
employeeArray = new String[employeeDescriptionArray.length];
for (int i = 0; i < employeeDescriptionArray.length; i++) {
_employeeDescription = employeeDescriptionArray[i];
List<NwaUser> _list = userMap.get(_employeeDescription);
if (_list != null && _list.size() > 0) {
String userName = _list.get(0).getUserName();
employee += (i == 0) ? userName : "," + userName;
employeeArray[i] = userName;
}
}
//查询匹配的设备
List<Resrce> emResourceList = resrceService.getResourceListByUT(site, resourceType, employeeArray);
if (emResourceList != null && emResourceList.size() > 0) {
resource = emResourceList.get(0).getResrce();
//查询匹配的设备
List<Resrce> emResourceList = resrceService.getResourceListByUT(site, resourceType, employeeArray);
if (emResourceList != null && emResourceList.size() > 0) {
resource = emResourceList.get(0).getResrce();
}
}
}
//派工人员赋值
sfcDispatch.setIsDispatch("true");
sfcDispatch.setResrce(resource);
sfcDispatch.setEmployee(employee);
sfcDispatch.setEmployeeDescription(employeeDescription);
sfcDispatch.setRemark(sfcDispatchDto.getRemark());
sfcDispatch.setBlankingSize(sfcDispatchDto.getBlankingSize());
sfcDispatch.setPlannedStartDate(sfcDispatchDto.getPlannedStartDate());
sfcDispatch.setPlannedCompDate(sfcDispatchDto.getPlannedCompDate());
sfcDispatch.setEarliestStartDate(sfcDispatchDto.getEarliestStartDate());
sfcDispatch.setLatestEndDate(sfcDispatchDto.getLatestEndDate());
sfcDispatch.setOther2(sfcDispatchDto.getOther2());
sfcDispatch.setIsUpdateZJHComplete(sfcDispatchDto.getIsUpdateZJHComplete());
list.add(sfcDispatch);
//记录派工人员
if (employeeArray != null && employeeArray.length > 0) {
SfcDispatchEmployeeDto sfcDispatchEmployee = new SfcDispatchEmployeeDto();
sfcDispatchEmployee.setSite(site);
sfcDispatchEmployee.setSfcDispatchBo(handle);
sfcDispatchEmployee.setDispatchEmployee(employeeArray);
sfcDispatchEmployeeList.add(sfcDispatchEmployee);
}
continue;
//派工人员赋值
sfcDispatch.setIsDispatch("true");
sfcDispatch.setResrce(resource);
sfcDispatch.setEmployee(employee);
sfcDispatch.setEmployeeDescription(employeeDescription);
sfcDispatch.setRemark(sfcDispatchDto.getRemark());
sfcDispatch.setBlankingSize(sfcDispatchDto.getBlankingSize());
sfcDispatch.setPlannedStartDate(sfcDispatchDto.getPlannedStartDate());
sfcDispatch.setPlannedCompDate(sfcDispatchDto.getPlannedCompDate());
sfcDispatch.setEarliestStartDate(sfcDispatchDto.getEarliestStartDate());
sfcDispatch.setLatestEndDate(sfcDispatchDto.getLatestEndDate());
sfcDispatch.setOther2(sfcDispatchDto.getOther2());
sfcDispatch.setIsUpdateZJHComplete(sfcDispatchDto.getIsUpdateZJHComplete());
list.add(sfcDispatch);
//记录派工人员
if (employeeArray != null && employeeArray.length > 0) {
SfcDispatchEmployeeDto sfcDispatchEmployee = new SfcDispatchEmployeeDto();
sfcDispatchEmployee.setSite(site);
sfcDispatchEmployee.setSfcDispatchBo(handle);
sfcDispatchEmployee.setDispatchEmployee(employeeArray);
sfcDispatchEmployeeList.add(sfcDispatchEmployee);
}
continue;
}
//派工保存

@ -0,0 +1,132 @@
package com.foreverwin.mesnac.meapi.controller;
import com.foreverwin.modular.core.util.R;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.CommonMethods;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.foreverwin.mesnac.meapi.service.LocationService;
import com.foreverwin.mesnac.meapi.model.Location;
import java.util.List;
/**
*
* @author YANG.WL
* @since 2022-08-04
*/
@RestController
@RequestMapping("/Z-LOCATION")
public class LocationController {
@Autowired
public LocationService locationService;
/**
* id
*
* @param id
* @return
*/
@ResponseBody
@GetMapping("/{id:.+}")
public R getLocationById(@PathVariable String id) {
return R.ok( locationService.getById(id));
}
/**
*
*
* @return
*/
@ResponseBody
@GetMapping("")
public R getLocationList(Location location){
List<Location> result;
QueryWrapper<Location> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(location);
result = locationService.list(queryWrapper);
return R.ok(result);
}
/**
*
*
* @param frontPage
* @return
*/
@ResponseBody
@GetMapping("/page")
public R page(FrontPage<Location> frontPage, Location location){
IPage result;
QueryWrapper<Location> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(location);
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
//TODO modify global query
queryWrapper.lambda().and(wrapper -> wrapper
.like(Location::getHandle, frontPage.getGlobalQuery())
.or().like(Location::getLocationCode, frontPage.getGlobalQuery())
.or().like(Location::getWorkCenter, frontPage.getGlobalQuery())
.or().like(Location::getDescription, frontPage.getGlobalQuery())
);
}
result = locationService.page(frontPage.getPagePlus(), queryWrapper);
return R.ok(result);
}
/**
*
* @param location
* @return null
*/
@PostMapping
public R save(@RequestBody Location location) {
return R.ok(locationService.save(location));
}
/**
*
* @param location
* @return null
*/
@PutMapping
public R updateById(@RequestBody Location location) {
return R.ok(locationService.updateById(location));
}
/**
* id
* @param id ID
* @return 0 1
*/
@ResponseBody
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
public R removeById(@PathVariable("id") String id){
return R.ok(locationService.removeById(id));
}
/**
*
* @param ids ID
* @return 0 1
*/
@ResponseBody
@RequestMapping(method = RequestMethod.POST, value = "/delete-batch")
public R removeByIds(List<String> ids){
return R.ok(locationService.removeByIds(ids));
}
@ResponseBody
@GetMapping("/LOCATION")
public Location getLocation(String code){
Location location=new Location();
location.setLocationCode(code);
QueryWrapper<Location> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(location);
location = locationService.getOne(queryWrapper);
return location;
}
}

@ -0,0 +1,122 @@
package com.foreverwin.mesnac.meapi.controller;
import com.foreverwin.modular.core.util.R;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.CommonMethods;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.foreverwin.mesnac.meapi.service.LogisticsBillService;
import com.foreverwin.mesnac.meapi.model.LogisticsBill;
import java.util.List;
/**
*
* @author YANG.WL
* @since 2022-08-05
*/
@RestController
@RequestMapping("/Z-LOGISTICS-BILL")
public class LogisticsBillController {
@Autowired
public LogisticsBillService logisticsBillService;
/**
* id
*
* @param id
* @return
*/
@ResponseBody
@GetMapping("/{id:.+}")
public R getLogisticsBillById(@PathVariable String id) {
return R.ok( logisticsBillService.getById(id));
}
/**
*
*
* @return
*/
@ResponseBody
@GetMapping("")
public R getLogisticsBillList(LogisticsBill logisticsBill){
List<LogisticsBill> result;
QueryWrapper<LogisticsBill> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(logisticsBill);
result = logisticsBillService.list(queryWrapper);
return R.ok(result);
}
/**
*
*
* @param frontPage
* @return
*/
@ResponseBody
@GetMapping("/page")
public R page(FrontPage<LogisticsBill> frontPage, LogisticsBill logisticsBill){
IPage result;
QueryWrapper<LogisticsBill> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(logisticsBill);
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
//TODO modify global query
queryWrapper.lambda().and(wrapper -> wrapper
.like(LogisticsBill::getLogisticsBillNo, frontPage.getGlobalQuery())
.or().like(LogisticsBill::getLogisticsBo, frontPage.getGlobalQuery())
.or().like(LogisticsBill::getOther1, frontPage.getGlobalQuery())
.or().like(LogisticsBill::getOther2, frontPage.getGlobalQuery())
.or().like(LogisticsBill::getOther3, frontPage.getGlobalQuery())
);
}
result = logisticsBillService.page(frontPage.getPagePlus(), queryWrapper);
return R.ok(result);
}
/**
*
* @param logisticsBill
* @return null
*/
@PostMapping
public R save(@RequestBody LogisticsBill logisticsBill) {
return R.ok(logisticsBillService.save(logisticsBill));
}
/**
*
* @param logisticsBill
* @return null
*/
@PutMapping
public R updateById(@RequestBody LogisticsBill logisticsBill) {
return R.ok(logisticsBillService.updateById(logisticsBill));
}
/**
* id
* @param id ID
* @return 0 1
*/
@ResponseBody
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
public R removeById(@PathVariable("id") String id){
return R.ok(logisticsBillService.removeById(id));
}
/**
*
* @param ids ID
* @return 0 1
*/
@ResponseBody
@RequestMapping(method = RequestMethod.POST, value = "/delete-batch")
public R removeByIds(List<String> ids){
return R.ok(logisticsBillService.removeByIds(ids));
}
}

@ -108,14 +108,14 @@ public class LogisticsTurnoverController {
/**
*
*
*
* @param logisticsDto
* @param logisticsDto
* @return
*/
@ResponseBody
@GetMapping("/querylogisticsturnovelist")
public R logisticsturnoverpage(LogisticsDto logisticsDto){
public R querylogisticsturnovelist(LogisticsDto logisticsDto){
List<LogisticsDto> result;
result = logisticsTurnoverService.selectlogisticsturnoverlist(logisticsDto);
return R.ok(result);
@ -180,18 +180,25 @@ public class LogisticsTurnoverController {
for (UserGroup userGroupModel: userGroupList) {
String userGroup = userGroupModel.getUserGroup();
if ("WL-HJ-HJ".equals(userGroup)) {
result = logisticsTurnoverService.queryLogisticsTurnoverList(userGroup,null,null,null);
result = logisticsTurnoverService.queryLogisticsTurnoverList(userGroup,null,null,null,null,null);
break;
} else if ("WL-HJ-XL".equals(userGroup)) {
result = logisticsTurnoverService.queryLogisticsTurnoverList(null,userGroup,null,null);
result = logisticsTurnoverService.queryLogisticsTurnoverList(null,userGroup,null,null,null,null);
break;
} else if ("WL-JJ-JJ".equals(userGroup)) {
result = logisticsTurnoverService.queryLogisticsTurnoverList(null,null,userGroup,null);
result = logisticsTurnoverService.queryLogisticsTurnoverList(null,null,userGroup,null,null,null);
break;
} else if ("WL-WX-WX".equals(userGroup)) {
result = logisticsTurnoverService.queryLogisticsTurnoverList(null,null,null,userGroup);
result = logisticsTurnoverService.queryLogisticsTurnoverList(null,null,null,userGroup,null,null);
break;
} else if ("WL-RC-RC".equals(userGroup)) {
result = logisticsTurnoverService.queryLogisticsTurnoverList(null,null,null,null,userGroup,null);
break;
} else if ("WL-ZP-ZP".equals(userGroup)) {
result = logisticsTurnoverService.queryLogisticsTurnoverList(null,null,null,null,null,userGroup);
break;
}
}
return Optional.ofNullable(result)
.map(t -> JSONObject.toJSONString(t)).orElse("null");
@ -246,4 +253,32 @@ public class LogisticsTurnoverController {
}
/**
*
* @param logisticsDtoList ID
* @return 0 1
*/
@ResponseBody
@PostMapping("/updatelogisticsTurnover")
public R updatelogisticsTurnover(@RequestBody List<LogisticsDto> logisticsDtoList) {
List<LogisticsTurnover> logisticsTurnoverList = new ArrayList<>();
LogisticsTurnover logisticsTurnover = new LogisticsTurnover();
if (!logisticsDtoList.isEmpty()) {
for (LogisticsDto logisticsDto : logisticsDtoList) {
logisticsTurnover.setHandle(logisticsDto.getHandle());
logisticsTurnover.setIsReceive("Y");
logisticsTurnover.setOther4(LocalDateTime.now());
logisticsTurnover.setOther5(CommonMethods.getUser());
logisticsTurnoverList.add(logisticsTurnover);
}
if (logisticsTurnoverService.updateBatchById(logisticsTurnoverList)) {
return R.ok("接收成功");
}else {
return R.failed("接收出错");
}
} else {
return R.failed("接收出错");
}
}
}

@ -27,6 +27,33 @@ public class LogisticsDto {
private String qtyToBuild;
private String zlDescription;
private String comfirmUser;
private String turnoutItem;
private String isReceive;
private String storageLocation;
public String getTurnoutItem() {
return turnoutItem;
}
public void setTurnoutItem(String turnoutItem) {
this.turnoutItem = turnoutItem;
}
public String getIsReceive() {
return isReceive;
}
public void setIsReceive(String isReceive) {
this.isReceive = isReceive;
}
public String getStorageLocation() {
return storageLocation;
}
public void setStorageLocation(String storageLocation) {
this.storageLocation = storageLocation;
}
public String getComfirmUser() {
return comfirmUser;

@ -0,0 +1,19 @@
package com.foreverwin.mesnac.meapi.mapper;
import com.foreverwin.mesnac.meapi.model.Location;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* Mapper
* </p>
*
* @author YANG.WL
* @since 2022-08-04
*/
@Repository
public interface LocationMapper extends BaseMapper<Location> {
Location getLocation(String locationcode);
}

@ -0,0 +1,18 @@
package com.foreverwin.mesnac.meapi.mapper;
import com.foreverwin.mesnac.meapi.model.LogisticsBill;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* Mapper
* </p>
*
* @author YANG.WL
* @since 2022-08-05
*/
@Repository
public interface LogisticsBillMapper extends BaseMapper<LogisticsBill> {
}

@ -23,7 +23,7 @@ public interface LogisticsTurnoverMapper extends BaseMapper<LogisticsTurnover> {
IPage<LogisticsDto> selectLogisticsDtoPage(FrontPage<LogisticsDto> frontPage, LogisticsDto logisticsDto);
List<LogisticsDto> queryLogisticsTurnoverList(@Param("HJHJ") String HJHJ,@Param("HJXL") String HJXL,@Param("JJ") String JJ,@Param("WX") String WX);
List<LogisticsDto> queryLogisticsTurnoverList(@Param("HJHJ") String HJHJ,@Param("HJXL") String HJXL,@Param("JJ") String JJ,@Param("WX") String WX,@Param("RC") String RC,@Param("ZP") String ZP);
LogisticsTurnover queryNewtistTurnoverTask(String InspectionTaskNo);

@ -0,0 +1,120 @@
package com.foreverwin.mesnac.meapi.model;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
/**
* <p>
*
* </p>
*
* @author YANG.WL
* @since 2022-08-04
*/
@TableName("Z_LOCATION")
public class Location extends Model<Location> {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableField("HANDLE")
private String handle;
/**
*
*/
@TableField("LOCATION_CODE")
private String locationCode;
/**
*
*/
@TableField("WORK_CENTER")
private String workCenter;
/**
*
*/
@TableField("CREATED_DATE_TIME")
private LocalDateTime createdDateTime;
/**
*
*/
@TableField("DESCRIPTION")
private String description;
public String getHandle() {
return handle;
}
public void setHandle(String handle) {
this.handle = handle;
}
public String getLocationCode() {
return locationCode;
}
public void setLocationCode(String locationCode) {
this.locationCode = locationCode;
}
public String getWorkCenter() {
return workCenter;
}
public void setWorkCenter(String workCenter) {
this.workCenter = workCenter;
}
public LocalDateTime getCreatedDateTime() {
return createdDateTime;
}
public void setCreatedDateTime(LocalDateTime createdDateTime) {
this.createdDateTime = createdDateTime;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public static final String HANDLE = "HANDLE";
public static final String LOCATION_CODE = "LOCATION_CODE";
public static final String WORK_CENTER = "WORK_CENTER";
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
public static final String DESCRIPTION = "DESCRIPTION";
@Override
protected Serializable pkVal() {
return this.handle;
}
@Override
public String toString() {
return "Location{" +
"handle = " + handle +
", locationCode = " + locationCode +
", workCenter = " + workCenter +
", createdDateTime = " + createdDateTime +
", description = " + description +
"}";
}
}

@ -0,0 +1,124 @@
package com.foreverwin.mesnac.meapi.model;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
/**
* <p>
*
* </p>
*
* @author YANG.WL
* @since 2022-08-05
*/
@TableName("Z_LOGISTICS_BILL")
public class LogisticsBill extends Model<LogisticsBill> {
private static final long serialVersionUID = 1L;
/**
*
*/
@TableField("LOGISTICS_BILL_NO")
private String logisticsBillNo;
/**
*
*/
@TableField("LOGISTICS_BO")
private String logisticsBo;
/**
*
*/
@TableField("COM_TIME")
private LocalDateTime comTime;
@TableField("OTHER1")
private String other1;
@TableField("OTHER2")
private String other2;
@TableField("OTHER3")
private String other3;
public String getLogisticsBillNo() {
return logisticsBillNo;
}
public void setLogisticsBillNo(String logisticsBillNo) {
this.logisticsBillNo = logisticsBillNo;
}
public String getLogisticsBo() {
return logisticsBo;
}
public void setLogisticsBo(String logisticsBo) {
this.logisticsBo = logisticsBo;
}
public LocalDateTime getComTime() {
return comTime;
}
public void setComTime(LocalDateTime comTime) {
this.comTime = comTime;
}
public String getOther1() {
return other1;
}
public void setOther1(String other1) {
this.other1 = other1;
}
public String getOther2() {
return other2;
}
public void setOther2(String other2) {
this.other2 = other2;
}
public String getOther3() {
return other3;
}
public void setOther3(String other3) {
this.other3 = other3;
}
public static final String LOGISTICS_BILL_NO = "LOGISTICS_BILL_NO";
public static final String LOGISTICS_BO = "LOGISTICS_BO";
public static final String COM_TIME = "COM_TIME";
public static final String OTHER1 = "OTHER1";
public static final String OTHER2 = "OTHER2";
public static final String OTHER3 = "OTHER3";
@Override
public String toString() {
return "LogisticsBill{" +
"logisticsBillNo = " + logisticsBillNo +
", logisticsBo = " + logisticsBo +
", comTime = " + comTime +
", other1 = " + other1 +
", other2 = " + other2 +
", other3 = " + other3 +
"}";
}
}

@ -0,0 +1,30 @@
package com.foreverwin.mesnac.meapi.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.Location;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.modular.core.util.FrontPage;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author YANG.WL
* @since 2022-08-04
*/
public interface LocationService extends IService<Location> {
/**
*
* @param frontPage
* @return
*/
IPage<Location> selectPage(FrontPage<Location> frontPage, Location location);
List<Location> selectList(Location location);
Location getLocation(String locationcode);
}

@ -0,0 +1,28 @@
package com.foreverwin.mesnac.meapi.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.LogisticsBill;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.modular.core.util.FrontPage;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author YANG.WL
* @since 2022-08-05
*/
public interface LogisticsBillService extends IService<LogisticsBill> {
/**
*
* @param frontPage
* @return
*/
IPage<LogisticsBill> selectPage(FrontPage<LogisticsBill> frontPage, LogisticsBill logisticsBill);
List<LogisticsBill> selectList(LogisticsBill logisticsBill);
}

@ -28,7 +28,7 @@ public interface LogisticsTurnoverService extends IService<LogisticsTurnover> {
List<LogisticsTurnover> selectList(LogisticsTurnover logisticsTurnover);
List<LogisticsDto> queryLogisticsTurnoverList(String HJHJ,String HJXL,String JJ,String WX);
List<LogisticsDto> queryLogisticsTurnoverList(String HJHJ,String HJXL,String JJ,String WX,String RC,String ZP);
LogisticsTurnover queryNewtistTurnoverTask(String InspectionTaskNo);

@ -0,0 +1,51 @@
package com.foreverwin.mesnac.meapi.service.impl;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.Location;
import com.foreverwin.mesnac.meapi.mapper.LocationMapper;
import com.foreverwin.mesnac.meapi.service.LocationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author YANG.WL
* @since 2022-08-04
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class LocationServiceImpl extends ServiceImpl<LocationMapper, Location> implements LocationService {
@Autowired
private LocationMapper locationMapper;
@Override
public IPage<Location> selectPage(FrontPage<Location> frontPage, Location location) {
QueryWrapper<Location> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(location);
return super.page(frontPage.getPagePlus(), queryWrapper);
}
@Override
public List<Location> selectList(Location location) {
QueryWrapper<Location> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(location);
return super.list(queryWrapper);
}
@Override
public Location getLocation(String locationcode) {
return locationMapper.getLocation(locationcode);
}
}

@ -0,0 +1,46 @@
package com.foreverwin.mesnac.meapi.service.impl;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.LogisticsBill;
import com.foreverwin.mesnac.meapi.mapper.LogisticsBillMapper;
import com.foreverwin.mesnac.meapi.service.LogisticsBillService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author YANG.WL
* @since 2022-08-05
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class LogisticsBillServiceImpl extends ServiceImpl<LogisticsBillMapper, LogisticsBill> implements LogisticsBillService {
@Autowired
private LogisticsBillMapper logisticsBillMapper;
@Override
public IPage<LogisticsBill> selectPage(FrontPage<LogisticsBill> frontPage, LogisticsBill logisticsBill) {
QueryWrapper<LogisticsBill> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(logisticsBill);
return super.page(frontPage.getPagePlus(), queryWrapper);
}
@Override
public List<LogisticsBill> selectList(LogisticsBill logisticsBill) {
QueryWrapper<LogisticsBill> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(logisticsBill);
return super.list(queryWrapper);
}
}

@ -44,8 +44,8 @@ public class LogisticsTurnoverServiceImpl extends ServiceImpl<LogisticsTurnoverM
}
@Override
public List<LogisticsDto> queryLogisticsTurnoverList(String HJHJ,String HJXL,String JJ,String WX) {
return logisticsTurnoverMapper.queryLogisticsTurnoverList(HJHJ,HJXL,JJ,WX);
public List<LogisticsDto> queryLogisticsTurnoverList(String HJHJ,String HJXL,String JJ,String WX,String RC,String ZP) {
return logisticsTurnoverMapper.queryLogisticsTurnoverList(HJHJ,HJXL,JJ,WX,RC,ZP);
}
@Override

@ -0,0 +1,293 @@
<?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="com.foreverwin.mesnac.meapi.mapper.LocationMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.Location">
<result column="HANDLE" property="handle" />
<result column="LOCATION_CODE" property="locationCode" />
<result column="WORK_CENTER" property="workCenter" />
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="DESCRIPTION" property="description" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, LOCATION_CODE, WORK_CENTER, CREATED_DATE_TIME, DESCRIPTION
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectByMap" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM Z_LOCATION
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</select>
<select id="selectOne" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_LOCATION
<where>
<if test="ew.entity.handle!=null">
HANDLE=#{ew.handle}
</if>
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
</where>
</select>
<select id="selectCount" resultType="Integer">
SELECT COUNT(1) FROM Z_LOCATION
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectList" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOCATION
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMaps" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOCATION
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectObjs" resultType="Object">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOCATION
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectPage" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOCATION
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMapsPage" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOCATION
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="getLocation" resultType="com.foreverwin.mesnac.meapi.model.Location">
SELECT * FROM Z_LOCATION WHERE LOCATION_CODE=#{locationcode}
</select>
<insert id="insert" parameterType="com.foreverwin.mesnac.meapi.model.Location">
INSERT INTO Z_LOCATION
<trim prefix="(" suffix=")" suffixOverrides=",">
HANDLE,
<if test="locationCode!=null">LOCATION_CODE,</if>
<if test="workCenter!=null">WORK_CENTER,</if>
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
<if test="description!=null">DESCRIPTION,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
<if test="locationCode!=null">#{locationCode},</if>
<if test="workCenter!=null">#{workCenter},</if>
<if test="createdDateTime!=null">#{createdDateTime},</if>
<if test="description!=null">#{description},</if>
</trim>
</insert>
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.Location">
INSERT INTO Z_LOCATION
<trim prefix="(" suffix=")" suffixOverrides=",">
<include refid="Base_Column_List"></include>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
#{locationCode},
#{workCenter},
#{createdDateTime},
#{description},
</trim>
</insert>
<update id="update">
UPDATE Z_LOCATION <trim prefix="SET" suffixOverrides=",">
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
<if test="et.locationCode!=null">LOCATION_CODE=#{et.locationCode},</if>
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
</trim>
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
HANDLE=#{ew.entity.handle}
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</update>
<delete id="deleteByMap">
DELETE FROM Z_LOCATION
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</delete>
<delete id="delete">
DELETE FROM Z_LOCATION
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.locationCode!=null"> AND LOCATION_CODE=#{ew.entity.locationCode}</if>
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
</mapper>

@ -0,0 +1,304 @@
<?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="com.foreverwin.mesnac.meapi.mapper.LogisticsBillMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.LogisticsBill">
<result column="LOGISTICS_BILL_NO" property="logisticsBillNo" />
<result column="LOGISTICS_BO" property="logisticsBo" />
<result column="COM_TIME" property="comTime" />
<result column="OTHER1" property="other1" />
<result column="OTHER2" property="other2" />
<result column="OTHER3" property="other3" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
LOGISTICS_BILL_NO, LOGISTICS_BO, COM_TIME, OTHER1, OTHER2, OTHER3
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectByMap" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM Z_LOGISTICS_BILL
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</select>
<select id="selectOne" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM Z_LOGISTICS_BILL
<where>
<if test="ew.entity.logisticsBillNo!=null">
LOGISTICS_BILL_NO=#{ew.logisticsBillNo}
</if>
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
</where>
</select>
<select id="selectCount" resultType="Integer">
SELECT COUNT(1) FROM Z_LOGISTICS_BILL
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.logisticsBillNo!=null">
LOGISTICS_BILL_NO=#{ew.entity.logisticsBillNo}
</if>
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectList" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOGISTICS_BILL
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.logisticsBillNo!=null">
LOGISTICS_BILL_NO=#{ew.entity.logisticsBillNo}
</if>
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMaps" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOGISTICS_BILL
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.logisticsBillNo!=null">
LOGISTICS_BILL_NO=#{ew.entity.logisticsBillNo}
</if>
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectObjs" resultType="Object">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOGISTICS_BILL
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.logisticsBillNo!=null">
LOGISTICS_BILL_NO=#{ew.entity.logisticsBillNo}
</if>
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectPage" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOGISTICS_BILL
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.logisticsBillNo!=null">
LOGISTICS_BILL_NO=#{ew.entity.logisticsBillNo}
</if>
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMapsPage" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_LOGISTICS_BILL
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.logisticsBillNo!=null">
LOGISTICS_BILL_NO=#{ew.entity.logisticsBillNo}
</if>
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<insert id="insert" parameterType="com.foreverwin.mesnac.meapi.model.LogisticsBill">
INSERT INTO Z_LOGISTICS_BILL
<trim prefix="(" suffix=")" suffixOverrides=",">
LOGISTICS_BILL_NO,
<if test="logisticsBo!=null">LOGISTICS_BO,</if>
<if test="comTime!=null">COM_TIME,</if>
<if test="other1!=null">OTHER1,</if>
<if test="other2!=null">OTHER2,</if>
<if test="other3!=null">OTHER3,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{logisticsBillNo},
<if test="logisticsBo!=null">#{logisticsBo},</if>
<if test="comTime!=null">#{comTime},</if>
<if test="other1!=null">#{other1},</if>
<if test="other2!=null">#{other2},</if>
<if test="other3!=null">#{other3},</if>
</trim>
</insert>
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.LogisticsBill">
INSERT INTO Z_LOGISTICS_BILL
<trim prefix="(" suffix=")" suffixOverrides=",">
<include refid="Base_Column_List"></include>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{logisticsBillNo},
#{logisticsBo},
#{comTime},
#{other1},
#{other2},
#{other3},
</trim>
</insert>
<update id="update">
UPDATE Z_LOGISTICS_BILL <trim prefix="SET" suffixOverrides=",">
<if test="et.logisticsBillNo!=null">LOGISTICS_BILL_NO=#{et.logisticsBillNo},</if>
<if test="et.logisticsBo!=null">LOGISTICS_BO=#{et.logisticsBo},</if>
<if test="et.comTime!=null">COM_TIME=#{et.comTime},</if>
<if test="et.other1!=null">OTHER1=#{et.other1},</if>
<if test="et.other2!=null">OTHER2=#{et.other2},</if>
<if test="et.other3!=null">OTHER3=#{et.other3},</if>
</trim>
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
LOGISTICS_BILL_NO=#{ew.entity.logisticsBillNo}
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</update>
<delete id="deleteByMap">
DELETE FROM Z_LOGISTICS_BILL
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</delete>
<delete id="delete">
DELETE FROM Z_LOGISTICS_BILL
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
LOGISTICS_BILL_NO=#{ew.entity.logisticsBillNo}
</if>
<if test="ew.entity.logisticsBo!=null"> AND LOGISTICS_BO=#{ew.entity.logisticsBo}</if>
<if test="ew.entity.comTime!=null"> AND COM_TIME=#{ew.entity.comTime}</if>
<if test="ew.entity.other1!=null"> AND OTHER1=#{ew.entity.other1}</if>
<if test="ew.entity.other2!=null"> AND OTHER2=#{ew.entity.other2}</if>
<if test="ew.entity.other3!=null"> AND OTHER3=#{ew.entity.other3}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
</mapper>

@ -606,6 +606,8 @@
<if test="HJXL!=null"> AND ZLT.TURNOUT_ITEM like '03%' AND ZLT.TURNOUT_WORKCENTER = 'HJ' </if>
<if test="JJ!=null">AND ZLT.TURNOUT_WORKCENTER = 'JJ' </if>
<if test="WX!=null">AND ZLT.TURNOUT_WORKCENTER = 'WX' </if>
<if test="RC!=null">AND ZLT.TURNOUT_WORKCENTER = 'RC' </if>
<if test="ZP!=null">AND ZLT.TURNOUT_WORKCENTER = 'ZP' </if>
GROUP BY WCT.DESCRIPTION,
ZSD.SFC,
@ -688,8 +690,9 @@
</if>
</select>
<select id="selectlogisticsturnoverlist" resultType="com.foreverwin.mesnac.meapi.dto.LogisticsDto">
SELECT
<select id="selectlogisticsturnoverlist" resultType="com.foreverwin.mesnac.meapi.dto.LogisticsDto" parameterType="com.foreverwin.mesnac.meapi.dto.LogisticsDto">
SELECT distinct
ZLT.HANDLE,
WCT.DESCRIPTION NEXT_WORK_CENTER,
ZSD.SFC,
C1.VALUE WORK_ORDER,
@ -706,6 +709,7 @@
SO.SHOP_ORDER,
ZL.DESCRIPTION ZL_DESCRIPTION,
CASE WHEN ZLT.STATUS = 'NEW' THEN '待转运' ELSE '转运完成' END STATUS,
CASE WHEN ZLT.IS_RECEIVE = 'Y' THEN '已接收' ELSE '未接收' END IS_RECEIVE,
ZLT.OTHER5 COMFIRM_USER
FROM
Z_LOGISTICS_TURNOVER ZLT
@ -730,5 +734,16 @@
AND O.CURRENT_REVISION = 'true'
LEFT JOIN OPERATION_T OT ON OT.OPERATION_BO = O.HANDLE
AND OT.LOCALE = 'zh'
<where>
<if test="status!=null"> AND STATUS=#{status}</if>
<if test="nextWorkCenter!=null"> AND TURNOVER_WORK_CENTER=#{nextWorkCenter}</if>
<if test="isReceive!=null"> AND IS_RECEIVE=#{isReceive}</if>
<if test="turnoutItem!=null"> AND TURNOUT_ITEM=#{turnoutItem}</if>
<if test="itemDescription!=null"> AND IT.DESCRIPTION LIKE '%'||#{itemDescription}||'%'</if>
<if test="workOrder!=null"> AND C1.VALUE LIKE '%'||#{workOrder}||'%'</if>
</where>
</select>
</mapper>

@ -469,23 +469,23 @@ public class PodTemplateServiceImpl implements PodTemplateService {
queryWrapper.eq(SfcDispatch.SHOP_ORDER,sfcDispatchById.getShopOrder());
queryWrapper.eq(SfcDispatch.DISPATCH_SEQ,String.valueOf(Integer.parseInt(sfcDispatchById.getDispatchSeq())+1));
SfcDispatch sfcDispatch=sfcDispatchService.getOne(queryWrapper);
if (sfcDispatch!=null && sfcDispatch.getOperation().equals("HJ_6106JYGX")){
Operation nextcurrentRevisionRef = operationService.getCurrentRevisionRef(site, sfcDispatch.getOperation());
BigDecimal workHours=BigDecimal.ZERO;
sfcCrossService.completeAction(site, nextcurrentRevisionRef.getHandle(), resrce, sfcServiceById.getHandle(), qty);
sfcDispatchCommonService.updateSfcDispatchStatus(site, CommonMethods.getUser(), sfcDispatch.getDispatchNo(), DispatchStatusEnum.COMPLETE.getCode(),workHours);
}
if (sfcDispatch!=null && sfcDispatch.getOperation().equals("HJ_6106JRGX")){
Operation nextcurrentRevisionRef = operationService.getCurrentRevisionRef(site, sfcDispatch.getOperation());
BigDecimal workHours=BigDecimal.ZERO;
sfcCrossService.completeAction(site, nextcurrentRevisionRef.getHandle(), resrce, sfcServiceById.getHandle(), qty);
sfcDispatchCommonService.updateSfcDispatchStatus(site, CommonMethods.getUser(), sfcDispatch.getDispatchNo(), DispatchStatusEnum.COMPLETE.getCode(),workHours);
SfcDispatchDto sfcdispatchs = new SfcDispatchDto();
sfcdispatchs.setHandle(HandleEnum.SFC_DISPATCH.getHandle(site, sfcDispatch.getHandle()));
sfcdispatchs = sfcDispatchCommonService.findSfcDispatchBySfc(sfcdispatchs);
sendErp(sfc, stepId, qty, BigDecimal.ZERO, qty.multiply(sfcdispatchs.getProdHours()));
}
// if (sfcDispatch!=null && sfcDispatch.getOperation().equals("HJ_6106JYGX")){
// Operation nextcurrentRevisionRef = operationService.getCurrentRevisionRef(site, sfcDispatch.getOperation());
// BigDecimal workHours=BigDecimal.ZERO;
// sfcCrossService.completeAction(site, nextcurrentRevisionRef.getHandle(), resrce, sfcServiceById.getHandle(), qty);
// sfcDispatchCommonService.updateSfcDispatchStatus(site, CommonMethods.getUser(), sfcDispatch.getDispatchNo(), DispatchStatusEnum.COMPLETE.getCode(),workHours);
// }
//
// if (sfcDispatch!=null && sfcDispatch.getOperation().equals("HJ_6106JRGX")){
// Operation nextcurrentRevisionRef = operationService.getCurrentRevisionRef(site, sfcDispatch.getOperation());
// BigDecimal workHours=BigDecimal.ZERO;
// sfcCrossService.completeAction(site, nextcurrentRevisionRef.getHandle(), resrce, sfcServiceById.getHandle(), qty);
// sfcDispatchCommonService.updateSfcDispatchStatus(site, CommonMethods.getUser(), sfcDispatch.getDispatchNo(), DispatchStatusEnum.COMPLETE.getCode(),workHours);
// SfcDispatchDto sfcdispatchs = new SfcDispatchDto();
// sfcdispatchs.setHandle(HandleEnum.SFC_DISPATCH.getHandle(site, sfcDispatch.getHandle()));
// sfcdispatchs = sfcDispatchCommonService.findSfcDispatchBySfc(sfcdispatchs);
// sendErp(sfc, stepId, qty, BigDecimal.ZERO, qty.multiply(sfcdispatchs.getProdHours()));
// }
/**
*

@ -2,11 +2,14 @@ package com.foreverwin.mesnac.quality.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.foreverwin.mesnac.common.constant.Constants;
import com.foreverwin.mesnac.common.constant.IntegrationTypeConstant;
import com.foreverwin.mesnac.common.enums.HandleEnum;
import com.foreverwin.mesnac.common.model.InspectionTask;
import com.foreverwin.mesnac.common.model.InspectionTaskDetail;
import com.foreverwin.mesnac.common.model.IntegrationLog;
import com.foreverwin.mesnac.common.service.InspectionTaskDetailService;
import com.foreverwin.mesnac.common.service.InspectionTaskService;
import com.foreverwin.mesnac.common.service.IntegrationLogService;
import com.foreverwin.mesnac.common.util.DateUtil;
import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.mesnac.dispatch.model.SfcDispatch;
@ -26,6 +29,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
@ -44,6 +48,8 @@ public class InspectionTaskManageServiceImpl implements InspectionTaskManageServ
private SfcDispatchService sfcDispatchService;
@Autowired
private LogisticsTurnoverService logisticsTurnoverService;
@Autowired
private IntegrationLogService integrationLogService;
@Override
@ -222,8 +228,23 @@ public class InspectionTaskManageServiceImpl implements InspectionTaskManageServ
queryWrapper.eq(SfcDispatch.DISPATCH_SEQ,String.valueOf(Integer.parseInt(sfcDispatchById.getDispatchSeq())+1));
SfcDispatch sfcDispatch=sfcDispatchService.getOne(queryWrapper);
if (sfcDispatch!=null&&!sfcDispatchById.getWorkCenter().equals(sfcDispatch.getWorkCenter())){
IntegrationLog log = new IntegrationLog();
log.setHandle(UUID.randomUUID().toString());
log.setSite(site);
log.setIntegrationType("LOGISTICS");
log.setCategory("RESPONSE");
log.setIntegrationWay("LOGISTICS");
log.setIntegrationMethod("InterfaceService.LOGISTICS");
log.setParam(sfcDispatch.toString());
log.setStatus("SUCCESS");
log.setResultMessage("SUCCESS");
log.setCreatedDateTime(LocalDateTime.now());
integrationLogService.saveIntegrationLog(log);
//生成周转任务的同时发送消息提示到手持设备
LogisticsTurnover logisticsTurnover=new LogisticsTurnover();
logisticsTurnover.setHandle("LogisticsBO:1000"+","+UUID.randomUUID().toString());
@ -255,8 +276,6 @@ public class InspectionTaskManageServiceImpl implements InspectionTaskManageServ
logisticsTurnover.setTurnoutWorkcenter(inspectionTaskManage.getWorkCenter());
logisticsTurnoverService.save(logisticsTurnover);
}
}
}

Loading…
Cancel
Save