修改接口参数

This commit is contained in:
yangjun 2025-10-22 16:23:51 +08:00
parent af7222f22e
commit b06dd9bd5d
9 changed files with 70 additions and 3 deletions

View File

@ -152,5 +152,12 @@ public class InvoicingApi {
return Result.OK("清空成功!");
}
@ApiOperation(value="作废采购单信息", notes="作废采购单信息")
@AutoLog(value = "作废采购单信息")
@PostMapping(value = "/voidedCgdMain")
public Result<String> voidedCgdMain(@RequestBody CgdMainEntity cgdMainEntity, HttpServletRequest req) {
invoicingApi.voidedCgdMain(cgdMainEntity);
return Result.OK("操作成功");
}
}

View File

@ -93,4 +93,5 @@ public class CgdInfoEntity implements Serializable {
private String tagType;
private String tagName;
private String wlParamInfo;
private String kcsl;
}

View File

@ -1,6 +1,7 @@
package com.nu.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
@ -75,4 +76,13 @@ public class QgdInfoEntity implements Serializable {
/**参考单价*/
private String referenceUnitPrice;
private String kcsl;
private String wlParamInfo;
private String categoryId;
private String typeId;
private String medicationId;
private String materialImg;
private String tagType;
private String tagName;
}

View File

@ -37,4 +37,5 @@ public interface IInvoicingApi {
void emptiedQgInfo();
void voidedCgdMain(CgdMainEntity cgdMainEntity);
}

View File

@ -3,9 +3,10 @@
<mapper namespace="com.nu.modules.cgd.mapper.NuInvoicingCgdInfoMapper">
<select id="queryCgdInfoList" resultType="com.nu.modules.cgd.entity.NuInvoicingCgdInfo">
select a.*,b.material_img,b.tag_type,c.item_text as tagName from nu_invoicing_cgd_info a
select a.*,b.material_img,b.tag_type,c.item_text as tagName,d.kcsl from nu_invoicing_cgd_info a
left join nu_config_material_info b on a.wl_id = b.id
left join sys_dict_item c on b.tag_type = c.item_value and c.dict_id = '1978662656563613698'
LEFT JOIN nu_warehouse_material_info d on a.wl_id = d.wl_id
${ew.customSqlSegment}
</select>
</mapper>

View File

@ -186,9 +186,13 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
//查询请购详细信息
QgdInfo nuInvoicingQgdInfo = new QgdInfo();
BeanUtils.copyProperties(qgdInfoEntityDto,nuInvoicingQgdInfo);
QueryWrapper<QgdInfo> queryWrapper = QueryGenerator.initQueryWrapper(nuInvoicingQgdInfo, req.getParameterMap());
QueryWrapper<QgdInfo> queryWrapper = QueryGenerator.initQueryWrapper("a",nuInvoicingQgdInfo, req.getParameterMap());
queryWrapper.eq(StringUtils.isNotBlank(qgdInfoEntityDto.getCategoryId()),"c.category_id",nuInvoicingQgdInfo.getCategoryId());
queryWrapper.eq(StringUtils.isNotBlank(qgdInfoEntityDto.getTypeId()),"c.type_id",nuInvoicingQgdInfo.getTypeId());
queryWrapper.eq(StringUtils.isNotBlank(qgdInfoEntityDto.getMedicationId()),"c.medication_id",nuInvoicingQgdInfo.getMedicationId());
queryWrapper.apply(StringUtils.isNotBlank(qgdInfoEntityDto.getWlParamInfo()),"( c.material_name like '%"+qgdInfoEntityDto.getWlParamInfo()+"%' or c.material_no like '%"+qgdInfoEntityDto.getWlParamInfo()+"%' or c.pinyin like '%"+qgdInfoEntityDto.getWlParamInfo()+"%' or c.specification_model like '%"+qgdInfoEntityDto.getWlParamInfo()+"%' ) ");
Page<QgdInfo> page = new Page<QgdInfo>(pageNo, pageSize);
List<QgdInfo> list = qgdInfoMapper.selectList(page, queryWrapper);
List<QgdInfo> list = qgdInfoMapper.queryShoppingCartList(page, queryWrapper);
//封装返回结果
IPage<QgdInfoEntity> entityPage = new Page<>(page.getCurrent(), page.getSize(), page.getTotal());
entityPage.setRecords(BeanUtil.copyToList(list, QgdInfoEntity.class));
@ -442,4 +446,14 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
public void emptiedQgInfo() {
qgdInfoMapper.delete(new QueryWrapper<QgdInfo>());
}
@Override
public void voidedCgdMain(CgdMainEntity cgdMainEntity) {
NuInvoicingCgdMain cgdMain = new NuInvoicingCgdMain();
BeanUtils.copyProperties(cgdMainEntity,cgdMain);
cgdMain.setStatus("3");
cgdMain.setCgdType("9");
baseMapper.updateById(cgdMain);
}
}

View File

@ -110,5 +110,17 @@ public class QgdInfo implements Serializable {
private String kcsl;
@TableField(exist = false)
private String wlParamInfo;
@TableField(exist = false)
private String categoryId;
@TableField(exist = false)
private String typeId;
@TableField(exist = false)
private String medicationId;
@TableField(exist = false)
private String materialImg;
@TableField(exist = false)
private String tagType;
@TableField(exist = false)
private String tagName;
}

View File

@ -8,6 +8,8 @@ import com.nu.modules.qgd.entity.QgdInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @Description: 请购单-请购信息
* @Author: jeecg-boot
@ -17,4 +19,6 @@ import org.apache.ibatis.annotations.Param;
public interface QgdInfoMapper extends BaseMapper<QgdInfo> {
IPage<QgdInfo> queryListByUser(Page<QgdInfo> page, @Param(Constants.WRAPPER) QueryWrapper<QgdInfo> queryWrapper);
List<QgdInfo> queryShoppingCartList(Page<QgdInfo> page, @Param(Constants.WRAPPER) QueryWrapper<QgdInfo> queryWrapper);
}

View File

@ -13,4 +13,21 @@
${ew.customSqlSegment}
</select>
<select id="queryShoppingCartList" resultType="com.nu.modules.qgd.entity.QgdInfo">
SELECT
a.*,b.kcsl,
c.category_id,
c.type_id,
c.medication_id,
c.tag_type,
d.item_text as tagName,
c.material_img
FROM nu_invoicing_qgd_info a
LEFT JOIN nu_warehouse_material_info b on a.wl_id = b.wl_id
LEFT JOIN nu_config_material_info c on a.wl_id = c.id
left join sys_dict_item d on c.tag_type = d.item_value and d.dict_id = '1978662656563613698'
${ew.customSqlSegment}
</select>
</mapper>