新购接口优化

This commit is contained in:
sxu 2024-11-07 14:36:23 +08:00
parent 2cfcff21ec
commit 2d80a26c48
3 changed files with 21 additions and 3 deletions

View File

@ -57,6 +57,16 @@ public class PurchaseCheckInfo extends BaseEntity {
@ApiModelProperty(value = "采购员") @ApiModelProperty(value = "采购员")
private Long purchaser; private Long purchaser;
/** 物资厂家id */
@Excel(name = "物资厂家id")
@ApiModelProperty(value = "物资厂家id")
private Long supplierId;
/** 物资厂家名称 */
@Excel(name = "物资厂家名称")
@ApiModelProperty(value = "物资厂家名称")
private Long supplierName;
/** 数据所属组织 */ /** 数据所属组织 */
@Excel(name = "数据所属组织") @Excel(name = "数据所属组织")
@ApiModelProperty(value = "数据所属组织") @ApiModelProperty(value = "数据所属组织")

View File

@ -167,7 +167,9 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
public AjaxResult insertPurchaseCheckInfo(PurchaseCheckDto purchaseCheckInfo) { public AjaxResult insertPurchaseCheckInfo(PurchaseCheckDto purchaseCheckInfo) {
// 赋值创建时间 // 赋值创建时间
purchaseCheckInfo.getPurchaseCheckInfo().setCreateTime(DateUtils.getNowDate()); purchaseCheckInfo.getPurchaseCheckInfo().setCreateTime(DateUtils.getNowDate());
purchaseCheckInfo.getPurchaseCheckInfo().setCreateBy(SecurityUtils.getLoginUser().getUsername()); purchaseCheckInfo.getPurchaseCheckInfo().setUpdateTime(DateUtils.getNowDate());
purchaseCheckInfo.getPurchaseCheckInfo().setCreateBy(SecurityUtils.getUsername());
purchaseCheckInfo.getPurchaseCheckInfo().setUpdateBy(SecurityUtils.getUsername());
try { try {
// 查询新购任务当月最大单号 // 查询新购任务当月最大单号
Integer thisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), Long.valueOf(PurchaseTaskEnum.PURCHASE_TASK_STATUS_WAIT_NOTICE.getTaskTypeId())); Integer thisMonthMaxOrder = tmTaskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), Long.valueOf(PurchaseTaskEnum.PURCHASE_TASK_STATUS_WAIT_NOTICE.getTaskTypeId()));

View File

@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="purchaseTime" column="purchase_time" /> <result property="purchaseTime" column="purchase_time" />
<result property="arrivalTime" column="arrival_time" /> <result property="arrivalTime" column="arrival_time" />
<result property="purchaser" column="purchaser" /> <result property="purchaser" column="purchaser" />
<result property="supplierId" column="supplier_id" />
<result property="taxRate" column="tax_rate" /> <result property="taxRate" column="tax_rate" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createUserName" column="purchaser_name" /> <result property="createUserName" column="purchaser_name" />
@ -29,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectPurchaseCheckInfoBaseSQL"> <sql id="selectPurchaseCheckInfoBaseSQL">
select select
id, task_id, purchase_time, arrival_time, purchaser, tax_rate, create_by, id, task_id, purchase_time, arrival_time, purchaser, supplier_id, tax_rate, create_by,
create_time, update_by, update_time, remark, company_id create_time, update_by, update_time, remark, company_id
from from
purchase_check_info purchase_check_info
@ -37,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectPurchaseCheckInfoJoinSQL"> <sql id="selectPurchaseCheckInfoJoinSQL">
select select
pci.id, pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.tax_rate, pci.create_by, pci.id, pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.supplier_id, pci.tax_rate, pci.create_by,
pci.create_time, pci.update_by, pci.update_time, pci.remark, pci.company_id, pci.create_time, pci.update_by, pci.update_time, pci.remark, pci.company_id,
t.task_status, t.task_type, t.code, su.user_name as create_user_name t.task_status, t.task_type, t.code, su.user_name as create_user_name
from from
@ -53,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="purchaseTime != null "> and purchase_time = #{purchaseTime}</if> <if test="purchaseTime != null "> and purchase_time = #{purchaseTime}</if>
<if test="arrivalTime != null "> and arrival_time = #{arrivalTime}</if> <if test="arrivalTime != null "> and arrival_time = #{arrivalTime}</if>
<if test="purchaser != null "> and purchaser = #{purchaser}</if> <if test="purchaser != null "> and purchaser = #{purchaser}</if>
<if test="supplierId != null "> and supplier_id = #{supplierId}</if>
<if test="taxRate != null "> and tax_rate = #{taxRate}</if> <if test="taxRate != null "> and tax_rate = #{taxRate}</if>
<if test="companyId != null "> and company_id = #{companyId}</if> <if test="companyId != null "> and company_id = #{companyId}</if>
</where> </where>
@ -70,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="purchaseTime != null">purchase_time,</if> <if test="purchaseTime != null">purchase_time,</if>
<if test="arrivalTime != null">arrival_time,</if> <if test="arrivalTime != null">arrival_time,</if>
<if test="purchaser != null">purchaser,</if> <if test="purchaser != null">purchaser,</if>
<if test="supplierId != null">supplier_id,</if>
<if test="taxRate != null">tax_rate,</if> <if test="taxRate != null">tax_rate,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
@ -83,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="purchaseTime != null">#{purchaseTime},</if> <if test="purchaseTime != null">#{purchaseTime},</if>
<if test="arrivalTime != null">#{arrivalTime},</if> <if test="arrivalTime != null">#{arrivalTime},</if>
<if test="purchaser != null">#{purchaser},</if> <if test="purchaser != null">#{purchaser},</if>
<if test="supplierId != null">#{supplierId},</if>
<if test="taxRate != null">#{taxRate},</if> <if test="taxRate != null">#{taxRate},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
@ -100,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="purchaseTime != null">purchase_time = #{purchaseTime},</if> <if test="purchaseTime != null">purchase_time = #{purchaseTime},</if>
<if test="arrivalTime != null">arrival_time = #{arrivalTime},</if> <if test="arrivalTime != null">arrival_time = #{arrivalTime},</if>
<if test="purchaser != null">purchaser = #{purchaser},</if> <if test="purchaser != null">purchaser = #{purchaser},</if>
<if test="supplierId != null">supplier_id = #{supplierId},</if>
<if test="taxRate != null">tax_rate = #{taxRate},</if> <if test="taxRate != null">tax_rate = #{taxRate},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
@ -129,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="purchaseTime != null "> and pci.purchase_time = #{purchaseTime}</if> <if test="purchaseTime != null "> and pci.purchase_time = #{purchaseTime}</if>
<if test="arrivalTime != null "> and pci.arrival_time = #{arrivalTime}</if> <if test="arrivalTime != null "> and pci.arrival_time = #{arrivalTime}</if>
<if test="purchaser != null "> and pci.purchaser = #{purchaser}</if> <if test="purchaser != null "> and pci.purchaser = #{purchaser}</if>
<if test="supplierId != null "> and pci.supplier_id = #{supplierId}</if>
<if test="taxRate != null "> and pci.tax_rate = #{taxRate}</if> <if test="taxRate != null "> and pci.tax_rate = #{taxRate}</if>
</where> </where>
</select> </select>