采购订单需加供应商字段,耗材字典选入时设置为为提交状态

master
anthonywj 2 years ago
parent 28cef02d5d
commit 40a8ed1475

@ -9,10 +9,7 @@ import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.controller.BaseController;
import com.glxp.api.entity.auth.AuthAdmin;
import com.glxp.api.entity.basic.BasicCorpEntity;
import com.glxp.api.entity.basic.UdiEntity;
import com.glxp.api.entity.basic.UdiProductEntity;
import com.glxp.api.entity.basic.UdiRlSupEntity;
import com.glxp.api.entity.basic.*;
import com.glxp.api.entity.system.CompanyEntity;
import com.glxp.api.exception.JsonException;
import com.glxp.api.req.basic.CompanyProductRelevanceRequest;
@ -234,6 +231,11 @@ public class UdiRlSupController extends BaseController {
if (vailResult != null)
return ResultVOUtils.error(500, vailResult);
companyProductsRelService.insertCompanyProducts(udiInfoExportRequest);
UdiRelevanceEntity udiRelevanceEntity = new UdiRelevanceEntity();
udiRelevanceEntity.setId(Long.parseLong(rlidStr));
udiRelevanceEntity.setLockStatus(1);
udiRelevanceService.updateUdiRelevance(udiRelevanceEntity);
UdiProductEntity udiProductEntity = new UdiProductEntity();
BeanUtils.copyProperties(udiProductEntity, udiInfoExportRequest.getSupplementRequest());
udiProductService.insertUdiInfo(udiProductEntity);

@ -149,15 +149,12 @@ public class IoOrderDetailBizController extends BaseController {
// todo 查询产品是否已经通过认证
if (isVailCert && udiRelevanceResponse.isNeedCert()) {
SupProductEntity supProductEntity = supProductService.findByRelIdFk(udiRelevanceResponse.getId() + "");
if (supProductEntity != null && (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS || supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS)) {
} else {
return ResultVOUtils.error(500, "产品资质证书未通过审核!");
}
}
IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity();

@ -219,6 +219,11 @@ public class PurOrderController {
}
public void genOrder() {
}
/**
*
*/

@ -4,7 +4,9 @@ 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 java.util.Date;
import lombok.Data;
@Data
@ -18,6 +20,9 @@ public class PurOrderEntity {
*/
@TableField(value = "billNo")
private String billNo;
@TableField(value = "supId")
private String supId;
/**
*

@ -145,6 +145,7 @@ public class FilterOrderRequest extends ListPageRequest {
* 退 supReturned
* supPurchase
* supInvoice
* norDetail
*/
private String actionType;

@ -76,4 +76,7 @@ public class PurOrderResponse {
private String emergency;
private Date arrivalTime;
private String supId;
private String supName;
}

@ -1,94 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.purchase.PurOrderDao">
<resultMap id="BaseResultMap" type="com.glxp.api.entity.purchase.PurOrderEntity">
<!--@mbg.generated-->
<!--@Table pur_order-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="billNo" jdbcType="VARCHAR" property="billNo" />
<result column="billDate" jdbcType="TIMESTAMP" property="billDate" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="billType" jdbcType="VARCHAR" property="billType" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="invCode" jdbcType="VARCHAR" property="invCode" />
<result column="deptCode" jdbcType="VARCHAR" property="deptCode" />
<result column="createUser" jdbcType="VARCHAR" property="createUser" />
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
<result column="auditUser" jdbcType="VARCHAR" property="auditUser" />
<result column="auditTime" jdbcType="TIMESTAMP" property="auditTime" />
<result column="auditRemark" jdbcType="VARCHAR" property="auditRemark" />
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
<result column="updateUser" jdbcType="VARCHAR" property="updateUser" />
<result column="applyCreateUser" jdbcType="VARCHAR" property="applyCreateUser" />
<result column="applyAuditUser" jdbcType="VARCHAR" property="applyAuditUser" />
<result column="applyRemark" jdbcType="VARCHAR" property="applyRemark" />
<result column="applyBillNo" jdbcType="VARCHAR" property="applyBillNo" />
<result column="stockOrderNo" jdbcType="VARCHAR" property="stockOrderNo" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, billNo, billDate, `status`, billType, remark, invCode, deptCode, `createUser`,
createTime, auditUser, auditTime, auditRemark, updateTime, updateUser, applyCreateUser,
applyAuditUser, applyRemark, applyBillNo, stockOrderNo
</sql>
<resultMap id="BaseResultMap" type="com.glxp.api.entity.purchase.PurOrderEntity">
<!--@mbg.generated-->
<!--@Table pur_order-->
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="billNo" jdbcType="VARCHAR" property="billNo"/>
<result column="billDate" jdbcType="TIMESTAMP" property="billDate"/>
<result column="status" jdbcType="TINYINT" property="status"/>
<result column="billType" jdbcType="VARCHAR" property="billType"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="invCode" jdbcType="VARCHAR" property="invCode"/>
<result column="deptCode" jdbcType="VARCHAR" property="deptCode"/>
<result column="createUser" jdbcType="VARCHAR" property="createUser"/>
<result column="createTime" jdbcType="TIMESTAMP" property="createTime"/>
<result column="auditUser" jdbcType="VARCHAR" property="auditUser"/>
<result column="auditTime" jdbcType="TIMESTAMP" property="auditTime"/>
<result column="auditRemark" jdbcType="VARCHAR" property="auditRemark"/>
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="updateUser" jdbcType="VARCHAR" property="updateUser"/>
<result column="applyCreateUser" jdbcType="VARCHAR" property="applyCreateUser"/>
<result column="applyAuditUser" jdbcType="VARCHAR" property="applyAuditUser"/>
<result column="applyRemark" jdbcType="VARCHAR" property="applyRemark"/>
<result column="applyBillNo" jdbcType="VARCHAR" property="applyBillNo"/>
<result column="stockOrderNo" jdbcType="VARCHAR" property="stockOrderNo"/>
<result column="supId" jdbcType="VARCHAR" property="supId"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, billNo, billDate, `status`, billType, remark, invCode, deptCode, `createUser`,
createTime, auditUser, auditTime, auditRemark, updateTime, updateUser, applyCreateUser,
applyAuditUser, applyRemark, applyBillNo, stockOrderNo,supId
</sql>
<select id="queryPageList" parameterType="com.glxp.api.req.purchase.PurOrderRequest"
resultType="com.glxp.api.res.purchase.PurOrderResponse">
<select id="queryPageList" parameterType="com.glxp.api.req.purchase.PurOrderRequest"
resultType="com.glxp.api.res.purchase.PurOrderResponse">
SELECT pur_order.*,
cb.employeeName createUserName,
ab.employeeName auditUserName,
auth_warehouse.NAME invName,
auth_dept.`name` deptName
FROM pur_order
LEFT JOIN auth_user cb ON pur_order.createUser = cb.id
LEFT JOIN auth_user ab ON pur_order.auditUser = ab.id
LEFT JOIN auth_warehouse ON pur_order.invCode = auth_warehouse.`code`
LEFT JOIN auth_dept ON auth_dept.CODE = pur_order.deptCode
<where>
<if test="billNo != '' and billNo != null">
AND billNo = #{billNo}
</if>
<if test="startDate != null and startDate != ''">
<![CDATA[
and DATE_FORMAT(pur_order.createTime, '%Y-%m-%d') >= #{startDate}
]]>
</if>
<if test="endDate != null and endDate != ''">
<![CDATA[
and DATE_FORMAT(pur_order.createTime, '%Y-%m-%d') <= #{endDate}
]]>
</if>
<if test="startAuditDate != null and startAuditDate != ''">
<![CDATA[
and DATE_FORMAT(pur_order.auditTime, '%Y-%m-%d') >= #{startAuditDate}
]]>
</if>
<if test="endAuditDate != null and endAuditDate != ''">
<![CDATA[
and DATE_FORMAT(pur_order.auditTime, '%Y-%m-%d') <= #{endAuditDate}
]]>
</if>
<if test="status != null and status != 10 and status != 11">
and pur_order.status = #{status}
</if>
<if test="status == 10">
and (pur_order.status = 3 or pur_order.status = 2 or pur_order.status = 4)
</if>
<if test="status == 11">
and (pur_order.status = 1 or pur_order.status = 2 or pur_order.status = 4)
</if>
SELECT
pur_order.*,
cb.employeeName createUserName,
ab.employeeName auditUserName,
auth_warehouse.NAME invName,
auth_dept.`name` deptName
FROM
pur_order
LEFT JOIN auth_user cb ON pur_order.createUser = cb.id
LEFT JOIN auth_user ab ON pur_order.auditUser = ab.id
LEFT JOIN auth_warehouse ON pur_order.invCode = auth_warehouse.`code`
LEFT JOIN auth_dept ON auth_dept.CODE = pur_order.deptCode
<where>
<if test="billNo != '' and billNo != null">
AND billNo = #{billNo}
</if>
<if test="startDate != null and startDate !=''">
<![CDATA[ and DATE_FORMAT(pur_order.createTime,'%Y-%m-%d')>= #{startDate}]]>
</if>
<if test="endDate != null and endDate !=''">
<![CDATA[ and DATE_FORMAT(pur_order.createTime,'%Y-%m-%d') <= #{endDate}]]>
</if>
<if test="startAuditDate != null and startAuditDate !=''">
<![CDATA[ and DATE_FORMAT(pur_order.auditTime,'%Y-%m-%d')>= #{startAuditDate}]]>
</if>
<if test="endAuditDate != null and endAuditDate !=''">
<![CDATA[ and DATE_FORMAT(pur_order.auditTime,'%Y-%m-%d') <= #{endAuditDate}]]>
</if>
<if test="status!=null and status!=10 and status!=11">
and pur_order.status = #{status}
</if>
<if test="status ==10">
and ( pur_order.status = 3 or pur_order.status=2 or pur_order.status=4)
</if>
<if test="status ==11">
and ( pur_order.status = 1 or pur_order.status=2 or pur_order.status=4)
</if>
<if test="deptCode != '' and deptCode != null">
AND deptCode = #{deptCode}
</if>
<if test="invCode != '' and invCode != null">
AND invCode = #{invCode}
</if>
<if test="auditUser != '' and auditUser != null">
AND auditUser = #{auditUser}
</if>
<if test="createUser != '' and createUser != null">
AND createUser = #{createUser}
</if>
</where>
</select>
</mapper>
<if test="deptCode != '' and deptCode != null">
AND deptCode = #{deptCode}
</if>
<if test="invCode != '' and invCode != null">
AND invCode = #{invCode}
</if>
<if test="auditUser != '' and auditUser != null">
AND auditUser = #{auditUser}
</if>
<if test="createUser != '' and createUser != null">
AND createUser = #{createUser}
</if>
</where>
</select>
</mapper>

@ -76,6 +76,7 @@ CALL Pro_Temp_ColumnWork('basic_bustype_change', 'beforeTime', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bustype_change', 'busBeforeTime', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('pur_order', 'emergency', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('pur_order', 'supId', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('pur_order', 'arrivalTime', 'datetime', 1);
CALL Pro_Temp_ColumnWork('pur_order_detail', 'planCount', 'tinyint', 1);

Loading…
Cancel
Save