新购验收查询接口添加

This commit is contained in:
liang.chao 2024-04-30 09:09:34 +08:00
parent dfd01cfd5f
commit 763c003c34
6 changed files with 53 additions and 6 deletions

View File

@ -532,11 +532,16 @@ public class TmTaskController extends BaseController {
@Log(title = "修改任务信息", businessType = BusinessType.UPDATE) @Log(title = "修改任务信息", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
public AjaxResult edit(@RequestBody TmTask task) { public AjaxResult edit(@RequestBody TmTask task) {
try {
if (StringUtils.isNull(task)) { if (StringUtils.isNull(task)) {
return AjaxResult.error("参数错误,传入信息为空!"); return AjaxResult.error("参数错误,传入信息为空!");
} }
tmTaskService.edit(task); tmTaskService.edit(task);
return AjaxResult.success("修改成功"); return AjaxResult.success("修改成功");
} catch (Exception e) {
return AjaxResult.error("修改失败");
}
} }

View File

@ -45,6 +45,18 @@ public class PurchaseMacodeInfoController extends BaseController {
return AjaxResult.success(list); return AjaxResult.success(list);
} }
/**
* 查询新购验收编号管理列表
*/
@ApiOperation(value = "查询单个新购验收编号管理列表详情")
@GetMapping("/details")
public AjaxResult details(PurchaseMacodeInfo purchaseMacodeInfo) throws Exception {
if (purchaseMacodeInfo.getTaskId() == null || purchaseMacodeInfo.getTaskId() == 0) {
throw new Exception("任务taskId为空!!!");
}
List<PurchaseMacodeInfo> list = purchaseMacodeInfoService.selectPurchaseMacodeInfoListDetails(purchaseMacodeInfo);
return AjaxResult.success(list);
}
/** /**
* 导出新购验收编号管理列表 * 导出新购验收编号管理列表
*/ */

View File

@ -280,4 +280,6 @@ public interface PurchaseMacodeInfoMapper {
int selectPurchaseCheckDetailsStatus(Long taskId); int selectPurchaseCheckDetailsStatus(Long taskId);
int updateMaTypeNum(MachinePart wholeSetDetail); int updateMaTypeNum(MachinePart wholeSetDetail);
List<PurchaseMacodeInfo> selectPurchaseMacodeInfoListDetails(PurchaseMacodeInfo purchaseMacodeInfo);
} }

View File

@ -32,6 +32,7 @@ public interface IPurchaseMacodeInfoService
* @return 新购验收编号管理purchase_macode_info集合 * @return 新购验收编号管理purchase_macode_info集合
*/ */
public List<PurchaseMacodeInfo> selectPurchaseMacodeInfoList(PurchaseMacodeInfo purchaseMacodeInfo); public List<PurchaseMacodeInfo> selectPurchaseMacodeInfoList(PurchaseMacodeInfo purchaseMacodeInfo);
public List<PurchaseMacodeInfo> selectPurchaseMacodeInfoListDetails(PurchaseMacodeInfo purchaseMacodeInfo);
/** /**
* 新增新购验收编号管理purchase_macode_info * 新增新购验收编号管理purchase_macode_info

View File

@ -92,6 +92,12 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
return purchaseMacodeInfoList; return purchaseMacodeInfoList;
} }
@Override
public List<PurchaseMacodeInfo> selectPurchaseMacodeInfoListDetails(PurchaseMacodeInfo purchaseMacodeInfo) {
List<PurchaseMacodeInfo> purchaseMacodeInfoList = purchaseMacodeInfoMapper.selectPurchaseMacodeInfoListDetails(purchaseMacodeInfo);
return purchaseMacodeInfoList;
}
/** /**
* 新增新购验收编号管理 * 新增新购验收编号管理
* *

View File

@ -45,6 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="codeType != null and codeType != ''"> and pmi.code_type = #{codeType}</if> <if test="codeType != null and codeType != ''"> and pmi.code_type = #{codeType}</if>
<if test="status != null and status != ''"> and pmi.status = #{status}</if> <if test="status != null and status != ''"> and pmi.status = #{status}</if>
<if test="companyId != null "> and pmi.company_id = #{companyId}</if> <if test="companyId != null "> and pmi.company_id = #{companyId}</if>
GROUP BY pcd.type_id
</select> </select>
<select id="selectPurchaseMacodeInfoByTaskId" parameterType="Long" resultMap="PurchaseMacodeInfoResult"> <select id="selectPurchaseMacodeInfoByTaskId" parameterType="Long" resultMap="PurchaseMacodeInfoResult">
@ -519,6 +520,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE WHERE
task_id = #{taskId} and status =4 task_id = #{taskId} and status =4
</select> </select>
<select id="selectPurchaseMacodeInfoListDetails" resultType="com.bonus.sgzb.material.domain.PurchaseMacodeInfo">
SELECT
mt.type_name specificationType,
mt1.type_name typeName,
pmi.ma_code maCode,
mm.assets_code assetsCode
FROM
purchase_check_details pcd
LEFT JOIN ma_type mt ON pcd.type_id = mt.type_id
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
LEFT JOIN purchase_macode_info pmi ON pmi.task_id = pcd.task_id
LEFT JOIN ma_machine mm on mm.ma_code = pmi.ma_code
AND pmi.type_id = pcd.type_id
LEFT JOIN purchase_check_info pt ON pcd.task_id = pt.task_id
WHERE
pcd.task_id = #{taskId}
AND mt.manage_type = '0'
AND pcd.`status` != 3
AND pcd.`status` != 5
</select>
<update id="updateTypeByTypeId"> <update id="updateTypeByTypeId">
update ma_type set num = #{num} where type_id = #{typeId} update ma_type set num = #{num} where type_id = #{typeId}