紧急任务修改
This commit is contained in:
+3
@@ -598,6 +598,9 @@ public class BillingStatementApplicationService {
|
||||
billingStatementPO.setTopOrganizationId(loginUser.getUserPo().getTopOrganizationId());
|
||||
billingStatementPO.setOrganizationId(loginUser.getUserPo().getOrganizationId());
|
||||
billingStatementPO.setOrganizationName(loginUser.getUserPo().getOrganizationName());
|
||||
// 默认填充当前登录人为业务员
|
||||
billingStatementPO.setSalesmanId(String.valueOf(loginUser.getUserid()));
|
||||
billingStatementPO.setSalesmanName(loginUser.getUserPo().getUserName());
|
||||
return billingStatementPO;
|
||||
}
|
||||
|
||||
|
||||
+21
-1
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mhd.bms.domain.billManage.entity.BillManage;
|
||||
import com.mhd.bms.domain.billManage.repository.mapper.BillManageMapper;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.entity.BmsInvoiceList;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.entity.BmsSettlementPartyInvoice;
|
||||
import com.mhd.bms.domain.bmsInvoiceList.repository.facade.IBmsInvoiceListService;
|
||||
@@ -56,6 +57,8 @@ public class BmsInvoiceListServiceImpl extends ServiceImpl<BmsInvoiceListMapper,
|
||||
private BmsMakeOutInvoiceItemMapper bmsMakeOutInvoiceItemMapper;
|
||||
@Resource
|
||||
private BillManageMapper billManageMapper;
|
||||
@Resource
|
||||
private com.mhd.system.api.SystemServiceFeign systemServiceFeign;
|
||||
/*@Resource
|
||||
private BmsSettlementPartyInvoiceMapper bmsSettlementPartyInvoiceMapper;*/
|
||||
|
||||
@@ -327,7 +330,7 @@ public class BmsInvoiceListServiceImpl extends ServiceImpl<BmsInvoiceListMapper,
|
||||
/**
|
||||
* 发票详情
|
||||
*
|
||||
* @param id
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@@ -415,6 +418,23 @@ public class BmsInvoiceListServiceImpl extends ServiceImpl<BmsInvoiceListMapper,
|
||||
bmsMakeOutInvoiceItem.setMakeId(bmsMakeOutInvoice.getId());
|
||||
//bmsMakeOutInvoiceItem.setCreateBy(sysUser.getId());
|
||||
bmsMakeOutInvoiceItem.setCreateTime(date);
|
||||
// 如果前端没传 invoiceItemName,按 invoiceItem(编码)从费用科目反查名称补齐
|
||||
if (StringUtils.isEmpty(bmsMakeOutInvoiceItem.getInvoiceItemName())
|
||||
&& StringUtils.isNotEmpty(bmsMakeOutInvoiceItem.getInvoiceItem())) {
|
||||
try {
|
||||
AjaxResult ajaxResult = systemServiceFeign.getSubInfoByCode(bmsMakeOutInvoiceItem.getInvoiceItem());
|
||||
if ("200".equals(String.valueOf(ajaxResult.get("code"))) && ajaxResult.get("data") != null) {
|
||||
com.alibaba.fastjson.JSONObject dataObj = com.alibaba.fastjson.JSON.parseObject(
|
||||
com.alibaba.fastjson.JSON.toJSONString(ajaxResult.get("data")));
|
||||
String subjectName = dataObj.getString("subjectName");
|
||||
if (StringUtils.isNotEmpty(subjectName)) {
|
||||
bmsMakeOutInvoiceItem.setInvoiceItemName(subjectName);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("开票项目名称反查失败 invoiceItem=" + bmsMakeOutInvoiceItem.getInvoiceItem() + " " + e.getMessage());
|
||||
}
|
||||
}
|
||||
bmsMakeOutInvoiceItemMapper.insert(bmsMakeOutInvoiceItem);
|
||||
}
|
||||
}
|
||||
|
||||
+11
@@ -290,6 +290,17 @@ public class ShiftManageApplicationService {
|
||||
return shiftManageDomainService.taskDistribution(shiftManageDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 撤回审核
|
||||
* @author gen
|
||||
* @date 2026/7/17
|
||||
* @param shiftManageDO
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean revokeAudit(ShiftManageDO shiftManageDO) {
|
||||
return shiftManageDomainService.revokeAudit(shiftManageDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 物料移位(PDA),与收货、上架一致:支持 getInfoByApp 的 parent_copy 结构及分批移位
|
||||
* 按单移位:PDA 仅传 shiftManageId、updateTime 时,自动从库中带出该单下所有待移位明细,默认 shiftQuantity=quantity
|
||||
|
||||
+44
@@ -3,6 +3,7 @@ package com.mhd.wms.domain.shiftManage.service;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.mhd.common.core.domain.po.UserPo;
|
||||
import com.mhd.common.core.exception.ServiceException;
|
||||
@@ -14,6 +15,7 @@ import com.mhd.system.api.domain.MaterialInventoryOmsParamDO;
|
||||
import com.mhd.system.api.domain.cache.AssociationWarehouseCacheDO;
|
||||
import com.mhd.system.api.domain.cache.SystemServiceCacheUtil;
|
||||
import com.mhd.system.api.model.LoginUser;
|
||||
import com.mhd.wms.domain.deliveTask.entity.DeliveTask;
|
||||
import com.mhd.wms.domain.deliveTask.repository.facade.IDeliveTaskService;
|
||||
import com.mhd.wms.domain.deliveTask.repository.todo.DeliveTaskDO;
|
||||
import com.mhd.wms.domain.inventoryStandingDetail.repository.facade.IInventoryStandingDetailService;
|
||||
@@ -484,6 +486,48 @@ public class ShiftManageDomainService {
|
||||
return shiftManageService.taskDistribution(shiftManageDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 撤回移位(待移位 → 已创建)
|
||||
* @author gen
|
||||
* @date 2026/7/17
|
||||
* @param shiftManageDO
|
||||
* @return Boolean
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean revokeAudit(ShiftManageDO shiftManageDO) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
List<Long> shiftManageIds = shiftManageDO.getShiftManageIds();
|
||||
if (CollectionUtils.isEmpty(shiftManageIds)) {
|
||||
throw new ServiceException("移位单id不能为空");
|
||||
}
|
||||
List<ShiftManage> shiftManageList = shiftManageService.listByIds(shiftManageIds);
|
||||
if (CollectionUtils.isEmpty(shiftManageList)) {
|
||||
throw new ServiceException("移位单不存在");
|
||||
}
|
||||
for (ShiftManage shiftManage : shiftManageList) {
|
||||
if (!Integer.valueOf(2).equals(shiftManage.getShiftStatus())) {
|
||||
throw new ServiceException("移位单【" + shiftManage.getShiftNumber() + "】状态不为待移位,不可撤回");
|
||||
}
|
||||
}
|
||||
// 删除生成的配送任务(taskType=5,trackingNumber=shiftNumber)
|
||||
List<String> shiftNumbers = shiftManageList.stream()
|
||||
.map(ShiftManage::getShiftNumber)
|
||||
.collect(Collectors.toList());
|
||||
deliveTaskService.remove(new QueryWrapper<DeliveTask>().lambda()
|
||||
.in(DeliveTask::getTrackingNumber, shiftNumbers)
|
||||
.eq(DeliveTask::getTaskType, 5));
|
||||
// 回退:shiftStatus=1(已创建),taskDistribution=2(未下发),auditStatus=1(未审核)
|
||||
shiftManageService.update(null, new UpdateWrapper<ShiftManage>().lambda()
|
||||
.set(ShiftManage::getShiftStatus, 1)
|
||||
.set(ShiftManage::getTaskDistribution, 2)
|
||||
.set(ShiftManage::getAuditStatus, 1)
|
||||
.set(ShiftManage::getUpdateBy, loginUser.getUserid())
|
||||
.set(ShiftManage::getUpdateByName, loginUser.getUsername())
|
||||
.set(ShiftManage::getUpdateTime, new Date())
|
||||
.in(ShiftManage::getShiftManageId, shiftManageIds));
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 物料移位
|
||||
*/
|
||||
|
||||
+10
@@ -120,4 +120,14 @@ public class ShiftManageApi extends BaseController {
|
||||
return AjaxResult.success(shiftManageApplicationService.taskDistribution(shiftManageDO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤回审核
|
||||
*/
|
||||
@ApiOperation("撤回审核")
|
||||
@PostMapping(value = "/revokeAudit")
|
||||
public AjaxResult revokeAudit(@RequestBody ShiftManageDTO shiftManageDTO) {
|
||||
ShiftManageDO shiftManageDO = shiftManageAssembler.toDO(shiftManageDTO);
|
||||
return AjaxResult.success(shiftManageApplicationService.revokeAudit(shiftManageDO));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user