成套机具代码提交
This commit is contained in:
parent
f94470a742
commit
62f2330ffb
|
|
@ -196,4 +196,6 @@ public interface BackReceiveMapper {
|
||||||
List<Integer> getMaId(BackApplyInfo backApplyInfo);
|
List<Integer> getMaId(BackApplyInfo backApplyInfo);
|
||||||
|
|
||||||
int selectNumByTypeId(@Param("parentId")Integer parentId,@Param("typeId") String typeId);
|
int selectNumByTypeId(@Param("parentId")Integer parentId,@Param("typeId") String typeId);
|
||||||
|
|
||||||
|
int selectTaskStatus(int taskId);
|
||||||
}
|
}
|
||||||
|
|
@ -148,6 +148,11 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
int res;
|
int res;
|
||||||
try {
|
try {
|
||||||
int taskId = record.getTaskId();
|
int taskId = record.getTaskId();
|
||||||
|
//先判断是否已经完成退料了
|
||||||
|
int taskStatus = selectTaskStatus(taskId);
|
||||||
|
if (taskStatus == 0) {
|
||||||
|
throw new RuntimeException("该退料单已完成退料");
|
||||||
|
}
|
||||||
//修改任务状态
|
//修改任务状态
|
||||||
res = updateTaskStatus(taskId, 40);
|
res = updateTaskStatus(taskId, 40);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
|
|
@ -197,7 +202,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
if (allList != null && allList.size() > 0) {
|
if (allList != null && allList.size() > 0) {
|
||||||
res = updateSlt(record, allList);
|
res = updateSlt(record, allList);
|
||||||
if (res == 0) {
|
if (res == 0) {
|
||||||
throw new RuntimeException("slt_agreement_info");
|
throw new RuntimeException("该机具未被领料使用");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -206,6 +211,15 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int selectTaskStatus(int taskId) {
|
||||||
|
int taskStatus = backReceiveMapper.selectTaskStatus(taskId);
|
||||||
|
if (taskStatus == 40) {
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private int updateSlt(BackApplyInfo record, List<BackApplyInfo> hgList) {
|
private int updateSlt(BackApplyInfo record, List<BackApplyInfo> hgList) {
|
||||||
for (BackApplyInfo bean : hgList) {
|
for (BackApplyInfo bean : hgList) {
|
||||||
List<SltAgreementInfo> infoList = backReceiveMapper.getStlInfo(bean);
|
List<SltAgreementInfo> infoList = backReceiveMapper.getStlInfo(bean);
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ public class WarehouseKeeperServiceImpl implements WarehouseKeeperService {
|
||||||
public int add(WarehouseKeeper bean) {
|
public int add(WarehouseKeeper bean) {
|
||||||
List<WarehouseKeeper> list = new ArrayList<>();
|
List<WarehouseKeeper> list = new ArrayList<>();
|
||||||
String typeIds = bean.getTypeIds();
|
String typeIds = bean.getTypeIds();
|
||||||
if(StringHelper.isNotEmpty(typeIds)){
|
if (StringHelper.isNotEmpty(typeIds)) {
|
||||||
String[] splitTypeIds = typeIds.split("@");
|
String[] splitTypeIds = typeIds.split("@");
|
||||||
//先删除,在去添加
|
//先删除,在去添加
|
||||||
warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
|
warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
|
||||||
|
|
@ -47,11 +47,9 @@ public class WarehouseKeeperServiceImpl implements WarehouseKeeperService {
|
||||||
list.add(beans);
|
list.add(beans);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int i =0;
|
int i = 0;
|
||||||
if(list.size()>0){
|
if (list.size() > 0) {
|
||||||
i= warehouseKeeperMapper.add(list);
|
i = warehouseKeeperMapper.add(list);
|
||||||
}else{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
@ -59,11 +57,11 @@ public class WarehouseKeeperServiceImpl implements WarehouseKeeperService {
|
||||||
@Override
|
@Override
|
||||||
public int deleteByIds(WarehouseKeeper bean) {
|
public int deleteByIds(WarehouseKeeper bean) {
|
||||||
int i = 1;
|
int i = 1;
|
||||||
if(StringHelper.isNotEmpty(bean.getType())){
|
if (StringHelper.isNotEmpty(bean.getType())) {
|
||||||
if("1".equals(bean.getType())){
|
if ("1".equals(bean.getType())) {
|
||||||
warehouseKeeperMapper.deleteByIds(bean.getTypeIds());
|
warehouseKeeperMapper.deleteByIds(bean.getTypeIds());
|
||||||
}else{
|
} else {
|
||||||
if(StringHelper.isNotEmpty(bean.getTypeIds())){
|
if (StringHelper.isNotEmpty(bean.getTypeIds())) {
|
||||||
List<WarehouseKeeper> list = new ArrayList<>();
|
List<WarehouseKeeper> list = new ArrayList<>();
|
||||||
String[] splitTypeIds = bean.getTypeIds().split("@");
|
String[] splitTypeIds = bean.getTypeIds().split("@");
|
||||||
warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
|
warehouseKeeperMapper.deleteByIdsAll(splitTypeIds);
|
||||||
|
|
|
||||||
|
|
@ -667,7 +667,7 @@
|
||||||
mt2.type_name AS typeName,
|
mt2.type_name AS typeName,
|
||||||
bad.pre_num as preNum,
|
bad.pre_num as preNum,
|
||||||
bad.status as status,
|
bad.status as status,
|
||||||
IFNULL(bad.audit_num,0)-IFNULL(aa.back_num,0) as partNum,
|
IFNULL(bad.audit_num,0)-IFNULL(aa.back_num,0) as num,
|
||||||
mt.manage_type as manageType,
|
mt.manage_type as manageType,
|
||||||
CONCAT('NSJJ',mt.`code`,mt.model_code) as `code`
|
CONCAT('NSJJ',mt.`code`,mt.model_code) as `code`
|
||||||
FROM
|
FROM
|
||||||
|
|
@ -931,6 +931,7 @@
|
||||||
<select id="getMaId" resultType="java.lang.Integer">
|
<select id="getMaId" resultType="java.lang.Integer">
|
||||||
select ma_id from back_check_details where parent_id = #{parentId} and type_id = #{typeId}
|
select ma_id from back_check_details where parent_id = #{parentId} and type_id = #{typeId}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectTaskStatus" resultType="java.lang.Integer">
|
||||||
|
select task_status from tm_task where task_id = #{taskId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||||
|
import com.bonus.sgzb.material.domain.MachinePart;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseInput;
|
import com.bonus.sgzb.material.domain.PurchaseInput;
|
||||||
import com.bonus.sgzb.material.service.IPurchaseCheckInfoService;
|
import com.bonus.sgzb.material.service.IPurchaseCheckInfoService;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||||
|
|
@ -30,8 +31,7 @@ import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
||||||
@RestController
|
@RestController
|
||||||
@Api(value = "新购验收任务")
|
@Api(value = "新购验收任务")
|
||||||
@RequestMapping("/purchaseCheckInfo")
|
@RequestMapping("/purchaseCheckInfo")
|
||||||
public class PurchaseCheckInfoController extends BaseController
|
public class PurchaseCheckInfoController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPurchaseCheckInfoService purchaseCheckInfoService;
|
private IPurchaseCheckInfoService purchaseCheckInfoService;
|
||||||
|
|
||||||
|
|
@ -52,20 +52,30 @@ public class PurchaseCheckInfoController extends BaseController
|
||||||
//若依框架多个查询会导致分页失效,需分批处理
|
//若依框架多个查询会导致分页失效,需分批处理
|
||||||
startPage();
|
startPage();
|
||||||
list = purchaseCheckInfoService.selectPutInListExamine(purchaseCheckInfo);
|
list = purchaseCheckInfoService.selectPutInListExamine(purchaseCheckInfo);
|
||||||
}else {
|
} else {
|
||||||
startPage();
|
startPage();
|
||||||
list = purchaseCheckInfoService.selectPutInListList(purchaseCheckInfo);
|
list = purchaseCheckInfoService.selectPutInListList(purchaseCheckInfo);
|
||||||
}
|
}
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成套机具明细查看
|
||||||
|
*/
|
||||||
|
@ApiOperation("成套机具明细查看")
|
||||||
|
@GetMapping("/wholeSetDetails")
|
||||||
|
public TableDataInfo wholeSetDetails(PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
|
startPage();
|
||||||
|
List<MachinePart> list = purchaseCheckInfoService.getWholeSetDetails(purchaseCheckInfo);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询新购验收任务列表
|
* 查询新购验收任务列表
|
||||||
*/
|
*/
|
||||||
@ApiOperation("查询新购验收任务列表")
|
@ApiOperation("查询新购验收任务列表")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(PurchaseCheckInfo purchaseCheckInfo)
|
public TableDataInfo list(PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<PurchaseCheckInfo> list = purchaseCheckInfoService.selectPurchaseCheckInfoList(purchaseCheckInfo);
|
List<PurchaseCheckInfo> list = purchaseCheckInfoService.selectPurchaseCheckInfoList(purchaseCheckInfo);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
|
@ -77,8 +87,7 @@ public class PurchaseCheckInfoController extends BaseController
|
||||||
@ApiOperation("导出新购验收任务列表")
|
@ApiOperation("导出新购验收任务列表")
|
||||||
@Log(title = "新购验收任务", businessType = BusinessType.EXPORT)
|
@Log(title = "新购验收任务", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, PurchaseCheckInfo purchaseCheckInfo)
|
public void export(HttpServletResponse response, PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
{
|
|
||||||
List<PurchaseCheckInfo> list = purchaseCheckInfoService.exportList(purchaseCheckInfo);
|
List<PurchaseCheckInfo> list = purchaseCheckInfoService.exportList(purchaseCheckInfo);
|
||||||
ExcelUtil<PurchaseCheckInfo> util = new ExcelUtil<PurchaseCheckInfo>(PurchaseCheckInfo.class);
|
ExcelUtil<PurchaseCheckInfo> util = new ExcelUtil<PurchaseCheckInfo>(PurchaseCheckInfo.class);
|
||||||
util.exportExcel(response, list, "新购验收任务数据");
|
util.exportExcel(response, list, "新购验收任务数据");
|
||||||
|
|
@ -90,8 +99,7 @@ public class PurchaseCheckInfoController extends BaseController
|
||||||
@ApiOperation("导出新购工机具入库")
|
@ApiOperation("导出新购工机具入库")
|
||||||
@Log(title = "导出新购工机具入库", businessType = BusinessType.EXPORT)
|
@Log(title = "导出新购工机具入库", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/putInExport")
|
@PostMapping("/putInExport")
|
||||||
public void putInExport(HttpServletResponse response, PurchaseCheckInfo purchaseCheckInfo)
|
public void putInExport(HttpServletResponse response, PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
{
|
|
||||||
List<PurchaseInput> list = purchaseCheckInfoService.putInExportList(purchaseCheckInfo);
|
List<PurchaseInput> list = purchaseCheckInfoService.putInExportList(purchaseCheckInfo);
|
||||||
ExcelUtil<PurchaseInput> util = new ExcelUtil<PurchaseInput>(PurchaseInput.class);
|
ExcelUtil<PurchaseInput> util = new ExcelUtil<PurchaseInput>(PurchaseInput.class);
|
||||||
util.exportExcel(response, list, "新购工机具入库");
|
util.exportExcel(response, list, "新购工机具入库");
|
||||||
|
|
@ -103,9 +111,8 @@ public class PurchaseCheckInfoController extends BaseController
|
||||||
@ApiOperation("获取新购验收任务详细信息")
|
@ApiOperation("获取新购验收任务详细信息")
|
||||||
@GetMapping(value = "/getDetails")
|
@GetMapping(value = "/getDetails")
|
||||||
public AjaxResult getInfo(@RequestParam(required = false) Long taskId,
|
public AjaxResult getInfo(@RequestParam(required = false) Long taskId,
|
||||||
@RequestParam(required = false) String keyWord)
|
@RequestParam(required = false) String keyWord) {
|
||||||
{
|
return success(purchaseCheckInfoService.selectPurchaseCheckInfoByTaskId(taskId, keyWord));
|
||||||
return success(purchaseCheckInfoService.selectPurchaseCheckInfoByTaskId(taskId,keyWord));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -114,9 +121,8 @@ public class PurchaseCheckInfoController extends BaseController
|
||||||
@ApiOperation("获取新购验收任务验收单")
|
@ApiOperation("获取新购验收任务验收单")
|
||||||
@GetMapping(value = "/getAcceptanceForm")
|
@GetMapping(value = "/getAcceptanceForm")
|
||||||
public AjaxResult getAcceptanceForm(@RequestParam(required = false) Long taskId,
|
public AjaxResult getAcceptanceForm(@RequestParam(required = false) Long taskId,
|
||||||
@RequestParam(required = false) String keyWord)
|
@RequestParam(required = false) String keyWord) {
|
||||||
{
|
return success(purchaseCheckInfoService.getAcceptanceForm(taskId, keyWord));
|
||||||
return success(purchaseCheckInfoService.getAcceptanceForm(taskId,keyWord));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -125,8 +131,7 @@ public class PurchaseCheckInfoController extends BaseController
|
||||||
@ApiOperation("新增新购验收任务")
|
@ApiOperation("新增新购验收任务")
|
||||||
@Log(title = "新购验收任务", businessType = BusinessType.INSERT)
|
@Log(title = "新购验收任务", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody PurchaseCheckInfo purchaseCheckInfo)
|
public AjaxResult add(@RequestBody PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
{
|
|
||||||
return toAjax(purchaseCheckInfoService.insertPurchaseCheckInfo(purchaseCheckInfo));
|
return toAjax(purchaseCheckInfoService.insertPurchaseCheckInfo(purchaseCheckInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -154,9 +159,8 @@ public class PurchaseCheckInfoController extends BaseController
|
||||||
*/
|
*/
|
||||||
@ApiOperation("删除新购验收任务")
|
@ApiOperation("删除新购验收任务")
|
||||||
@Log(title = "新购验收任务", businessType = BusinessType.DELETE)
|
@Log(title = "新购验收任务", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{taskId}")
|
@DeleteMapping("/{taskId}")
|
||||||
public AjaxResult remove(@PathVariable Long taskId)
|
public AjaxResult remove(@PathVariable Long taskId) {
|
||||||
{
|
|
||||||
return toAjax(purchaseCheckInfoService.deletePurchaseCheckInfoByTaskId(taskId));
|
return toAjax(purchaseCheckInfoService.deletePurchaseCheckInfoByTaskId(taskId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.sgzb.material.mapper;
|
package com.bonus.sgzb.material.mapper;
|
||||||
|
|
||||||
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
||||||
|
import com.bonus.sgzb.material.domain.MachinePart;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseInput;
|
import com.bonus.sgzb.material.domain.PurchaseInput;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
@ -15,8 +16,7 @@ import java.util.List;
|
||||||
* @date 2023-12-10
|
* @date 2023-12-10
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface PurchaseCheckInfoMapper
|
public interface PurchaseCheckInfoMapper {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* 查询新购验收任务purchase_check_info
|
* 查询新购验收任务purchase_check_info
|
||||||
*
|
*
|
||||||
|
|
@ -67,14 +67,15 @@ public interface PurchaseCheckInfoMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询新购入库任务列表
|
* 查询新购入库任务列表
|
||||||
* @param taskId
|
*
|
||||||
** @param type 1-验收,2-入库
|
* @param taskId * @param type 1-验收,2-入库
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
String selectTypeNameByTaskId(@Param("taskId") Long taskId,@Param("type") String type);
|
String selectTypeNameByTaskId(@Param("taskId") Long taskId, @Param("type") String type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 插入
|
* 插入
|
||||||
|
*
|
||||||
* @param bmNoticeInfo
|
* @param bmNoticeInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -82,6 +83,7 @@ public interface PurchaseCheckInfoMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询
|
* 查询
|
||||||
|
*
|
||||||
* @param purchaseCheckInfo
|
* @param purchaseCheckInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -89,12 +91,15 @@ public interface PurchaseCheckInfoMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新购验收
|
* 新购验收
|
||||||
|
*
|
||||||
* @param purchaseCheckInfo
|
* @param purchaseCheckInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<PurchaseCheckInfo> exportList(PurchaseCheckInfo purchaseCheckInfo);
|
List<PurchaseCheckInfo> exportList(PurchaseCheckInfo purchaseCheckInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新购入库导出
|
* 新购入库导出
|
||||||
|
*
|
||||||
* @param purchaseCheckInfo
|
* @param purchaseCheckInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -102,6 +107,7 @@ public interface PurchaseCheckInfoMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询
|
* 查询
|
||||||
|
*
|
||||||
* @param purchaseCheckInfo
|
* @param purchaseCheckInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -109,8 +115,11 @@ public interface PurchaseCheckInfoMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询 类型名称和管理类型
|
* 查询 类型名称和管理类型
|
||||||
|
*
|
||||||
* @param taskId
|
* @param taskId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<PurchaseCheckInfo> selectTypeNameAndManageTypeByTaskId(Long taskId);
|
List<PurchaseCheckInfo> selectTypeNameAndManageTypeByTaskId(Long taskId);
|
||||||
|
|
||||||
|
List<MachinePart> getWholeSetDetails(PurchaseCheckInfo purchaseCheckInfo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.bonus.sgzb.material.service;
|
package com.bonus.sgzb.material.service;
|
||||||
|
|
||||||
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
||||||
|
import com.bonus.sgzb.material.domain.MachinePart;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||||
import com.bonus.sgzb.material.domain.PurchaseInput;
|
import com.bonus.sgzb.material.domain.PurchaseInput;
|
||||||
import com.bonus.sgzb.material.vo.NoticeInfoVO;
|
import com.bonus.sgzb.material.vo.NoticeInfoVO;
|
||||||
|
|
@ -107,4 +108,6 @@ public interface IPurchaseCheckInfoService
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<PurchaseCheckInfo> selectPutInListExamine(PurchaseCheckInfo purchaseCheckInfo);
|
List<PurchaseCheckInfo> selectPutInListExamine(PurchaseCheckInfo purchaseCheckInfo);
|
||||||
|
|
||||||
|
List<MachinePart> getWholeSetDetails(PurchaseCheckInfo purchaseCheckInfo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
public List<PurchaseCheckInfo> selectPutInListList(PurchaseCheckInfo purchaseCheckInfo) {
|
public List<PurchaseCheckInfo> selectPutInListList(PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseCheckInfoMapper.selectPutInListList(purchaseCheckInfo);
|
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseCheckInfoMapper.selectPutInListList(purchaseCheckInfo);
|
||||||
for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) {
|
for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) {
|
||||||
String typeName = purchaseCheckInfoMapper.selectTypeNameByTaskId(checkInfo.getTaskId(),"2");
|
String typeName = purchaseCheckInfoMapper.selectTypeNameByTaskId(checkInfo.getTaskId(), "2");
|
||||||
checkInfo.setPurchasingTypeName(typeName);
|
checkInfo.setPurchasingTypeName(typeName);
|
||||||
}
|
}
|
||||||
return purchaseCheckInfos;
|
return purchaseCheckInfos;
|
||||||
|
|
@ -101,12 +101,17 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
public List<PurchaseCheckInfo> selectPutInListExamine(PurchaseCheckInfo purchaseCheckInfo) {
|
public List<PurchaseCheckInfo> selectPutInListExamine(PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseCheckInfoMapper.selectPutInListExamine(purchaseCheckInfo);
|
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseCheckInfoMapper.selectPutInListExamine(purchaseCheckInfo);
|
||||||
for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) {
|
for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) {
|
||||||
String typeName = purchaseCheckInfoMapper.selectTypeNameByTaskId(checkInfo.getTaskId(),"3");
|
String typeName = purchaseCheckInfoMapper.selectTypeNameByTaskId(checkInfo.getTaskId(), "3");
|
||||||
checkInfo.setPurchasingTypeName(typeName);
|
checkInfo.setPurchasingTypeName(typeName);
|
||||||
}
|
}
|
||||||
return purchaseCheckInfos;
|
return purchaseCheckInfos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MachinePart> getWholeSetDetails(PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
|
return purchaseCheckInfoMapper.getWholeSetDetails(purchaseCheckInfo);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询新购验收任务列表
|
* 查询新购验收任务列表
|
||||||
*
|
*
|
||||||
|
|
@ -117,13 +122,13 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
public List<PurchaseCheckInfo> selectPurchaseCheckInfoList(PurchaseCheckInfo purchaseCheckInfo) {
|
public List<PurchaseCheckInfo> selectPurchaseCheckInfoList(PurchaseCheckInfo purchaseCheckInfo) {
|
||||||
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseCheckInfoMapper.selectPurchaseCheckInfoList(purchaseCheckInfo);
|
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseCheckInfoMapper.selectPurchaseCheckInfoList(purchaseCheckInfo);
|
||||||
for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) {
|
for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) {
|
||||||
String typeName="";
|
String typeName = "";
|
||||||
List<PurchaseCheckInfo> list = purchaseCheckInfoMapper.selectTypeNameAndManageTypeByTaskId(checkInfo.getTaskId());
|
List<PurchaseCheckInfo> list = purchaseCheckInfoMapper.selectTypeNameAndManageTypeByTaskId(checkInfo.getTaskId());
|
||||||
if (list.size()>0){
|
if (list.size() > 0) {
|
||||||
typeName = list.get(0).getPurchasingTypeName();
|
typeName = list.get(0).getPurchasingTypeName();
|
||||||
if (list.get(0).getManageType().contains("0")){
|
if (list.get(0).getManageType().contains("0")) {
|
||||||
checkInfo.setManageType("0");
|
checkInfo.setManageType("0");
|
||||||
}else {
|
} else {
|
||||||
checkInfo.setManageType("1");
|
checkInfo.setManageType("1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -168,20 +173,22 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
return purchaseCheckInfoMapper.insertPurchaseCheckInfo(purchaseCheckInfo);
|
return purchaseCheckInfoMapper.insertPurchaseCheckInfo(purchaseCheckInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**采购单号编码生成规则*/
|
/**
|
||||||
|
* 采购单号编码生成规则
|
||||||
|
*/
|
||||||
private String purchaseCodeRule() {
|
private String purchaseCodeRule() {
|
||||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
Date nowDate = DateUtils.getNowDate();
|
Date nowDate = DateUtils.getNowDate();
|
||||||
String format = dateFormat.format(nowDate);
|
String format = dateFormat.format(nowDate);
|
||||||
String taskNum = taskMapper.selectTaskNumByMonths(nowDate, 23);
|
String taskNum = taskMapper.selectTaskNumByMonths(nowDate, 23);
|
||||||
if (StringHelper.isNotEmpty(taskNum)){
|
if (StringHelper.isNotEmpty(taskNum)) {
|
||||||
// 将字符串转换为整数
|
// 将字符串转换为整数
|
||||||
int num = Integer.parseInt(taskNum);
|
int num = Integer.parseInt(taskNum);
|
||||||
// 执行加一操作
|
// 执行加一操作
|
||||||
num++;
|
num++;
|
||||||
// 将结果转换回字符串格式,并确保结果是四位数,不足四位则在前面补0
|
// 将结果转换回字符串格式,并确保结果是四位数,不足四位则在前面补0
|
||||||
taskNum = String.format("%04d", num);
|
taskNum = String.format("%04d", num);
|
||||||
}else {
|
} else {
|
||||||
taskNum = "0001";
|
taskNum = "0001";
|
||||||
}
|
}
|
||||||
String code = "XG" + format + "-" + taskNum;
|
String code = "XG" + format + "-" + taskNum;
|
||||||
|
|
|
||||||
|
|
@ -309,4 +309,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
) t
|
) t
|
||||||
GROUP BY task_id
|
GROUP BY task_id
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getWholeSetDetails" resultType="com.bonus.sgzb.material.domain.MachinePart">
|
||||||
|
SELECT
|
||||||
|
mt2.type_name AS typeModelName,
|
||||||
|
mt3.type_name AS typeName,
|
||||||
|
aa.part_num * #{purchaseNum} AS partNum,
|
||||||
|
mt2.unit_name as unitName
|
||||||
|
FROM
|
||||||
|
ma_type mt2
|
||||||
|
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT
|
||||||
|
mws.type_id,
|
||||||
|
mws.part_num
|
||||||
|
FROM
|
||||||
|
ma_type mt
|
||||||
|
LEFT JOIN ma_whole_set mws ON mt.type_id = mws.parent_id
|
||||||
|
WHERE
|
||||||
|
mt.type_id = #{typeId}
|
||||||
|
) aa ON aa.type_id = mt2.type_id
|
||||||
|
<if test="keyWord != null and keyWord != ''">
|
||||||
|
WHERE mt2.type_name like concat('%', #{keyWord}, '%')
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -885,4 +885,3 @@ export default {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
Loading…
Reference in New Issue