物资类型新增字段

This commit is contained in:
syruan 2024-10-18 15:29:49 +08:00
parent bb4d2ebf80
commit 77e19d4d9d
3 changed files with 64 additions and 10 deletions

View File

@ -33,6 +33,10 @@ public class Type extends BaseEntity {
@ApiModelProperty(value = "类型名称") @ApiModelProperty(value = "类型名称")
private String typeName; private String typeName;
/** 仓库名称 */
@ApiModelProperty(value = "物资仓库名称")
private String houseName;
/** 上级ID */ /** 上级ID */
@Excel(name = "上级ID") @Excel(name = "上级ID")
@ApiModelProperty(value = "上级ID") @ApiModelProperty(value = "上级ID")
@ -41,7 +45,15 @@ public class Type extends BaseEntity {
/** 实时库存 */ /** 实时库存 */
@Excel(name = "实时库存") @Excel(name = "实时库存")
@ApiModelProperty(value = "实时库存") @ApiModelProperty(value = "实时库存")
private Long storageNum; private Long storageNum = 0L;
/** 是否扣费 */
@ApiModelProperty(value = "是否扣费,true:扣费, false:不")
private Boolean isCharging = false;
/** 检验周期 */
@ApiModelProperty(value = "检验周期,单位:月")
private Integer testCycle = 0;
/** 类型编号 */ /** 类型编号 */
@Excel(name = "类型编号") @Excel(name = "类型编号")
@ -58,6 +70,10 @@ public class Type extends BaseEntity {
@ApiModelProperty(value = "计量单位ID") @ApiModelProperty(value = "计量单位ID")
private Long unitId; private Long unitId;
/** 计量单位名称 */
@ApiModelProperty(value = "计量单位名称")
private String unitName;
/** 管理方式(0编号 1计数) */ /** 管理方式(0编号 1计数) */
@Excel(name = "管理方式(0编号 1计数)") @Excel(name = "管理方式(0编号 1计数)")
@ApiModelProperty(value = "管理方式(0编号 1计数)") @ApiModelProperty(value = "管理方式(0编号 1计数)")
@ -89,6 +105,14 @@ public class Type extends BaseEntity {
@ApiModelProperty(value = "丢失赔偿比率") @ApiModelProperty(value = "丢失赔偿比率")
private BigDecimal payRatio; private BigDecimal payRatio;
/** 丢失赔偿价 */
@ApiModelProperty(value = "丢失赔偿价")
private BigDecimal payPrice;
/** 税率 */
@ApiModelProperty(value = "税率")
private BigDecimal taxRatio;
/** 层级 */ /** 层级 */
@Excel(name = "层级") @Excel(name = "层级")
@ApiModelProperty(value = "层级") @ApiModelProperty(value = "层级")

View File

@ -66,6 +66,9 @@ public class SupplierInfoServiceImpl implements ISupplierInfoService {
supplierInfo.setCreateTime(DateUtils.getNowDate()); supplierInfo.setCreateTime(DateUtils.getNowDate());
int insertedSupplierInfoResult = supplierInfoMapper.insertSupplierInfo(supplierInfo); int insertedSupplierInfoResult = supplierInfoMapper.insertSupplierInfo(supplierInfo);
if (insertedSupplierInfoResult > 0) { if (insertedSupplierInfoResult > 0) {
if (supplierInfo.getBusinessLicenseFileList() == null) {
return AjaxResult.success("新增任务成功,无营业执照附件");
}
AtomicBoolean addFileInfoResult = new AtomicBoolean(false); AtomicBoolean addFileInfoResult = new AtomicBoolean(false);
supplierInfo.getBusinessLicenseFileList().forEach(file -> { supplierInfo.getBusinessLicenseFileList().forEach(file -> {
BmFileInfo bmFileInfo = new BmFileInfo(); BmFileInfo bmFileInfo = new BmFileInfo();
@ -77,7 +80,7 @@ public class SupplierInfoServiceImpl implements ISupplierInfoService {
bmFileInfo.setModelId(MODEL_ID); bmFileInfo.setModelId(MODEL_ID);
addFileInfoResult.set(bmFileInfoMapper.insertBmFileInfo(bmFileInfo) > 0); addFileInfoResult.set(bmFileInfoMapper.insertBmFileInfo(bmFileInfo) > 0);
}); });
return addFileInfoResult.get() ? AjaxResult.success("新增任务成功") : AjaxResult.error("新增任务失败,详情表插入0条"); return addFileInfoResult.get() ? AjaxResult.success("新增任务成功") : AjaxResult.error("新增任务失败,附件表插入0条");
} else { } else {
return AjaxResult.error("新增任务失败,info表插入0条"); return AjaxResult.error("新增任务失败,info表插入0条");
} }

View File

@ -12,12 +12,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="typeCode" column="type_code" /> <result property="typeCode" column="type_code" />
<result property="modelCode" column="model_code" /> <result property="modelCode" column="model_code" />
<result property="unitId" column="unit_id" /> <result property="unitId" column="unit_id" />
<result property="unitName" column="unit_name" />
<result property="manageType" column="manage_type" /> <result property="manageType" column="manage_type" />
<result property="leasePrice" column="lease_price" /> <result property="leasePrice" column="lease_price" />
<result property="effTime" column="eff_time" /> <result property="effTime" column="eff_time" />
<result property="rentPrice" column="rent_price" /> <result property="rentPrice" column="rent_price" />
<result property="buyPrice" column="buy_price" /> <result property="buyPrice" column="buy_price" />
<result property="payRatio" column="pay_ratio" /> <result property="payRatio" column="pay_ratio" />
<result property="payPrice" column="pay_price" />
<result property="taxRatio" column="tax_ratio" />
<result property="level" column="level" /> <result property="level" column="level" />
<result property="ratedLoad" column="rated_load" /> <result property="ratedLoad" column="rated_load" />
<result property="testLoad" column="test_load" /> <result property="testLoad" column="test_load" />
@ -43,12 +46,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="typeCode" column="type_code" /> <result property="typeCode" column="type_code" />
<result property="modelCode" column="model_code" /> <result property="modelCode" column="model_code" />
<result property="unitId" column="unit_id" /> <result property="unitId" column="unit_id" />
<result property="unitName" column="unit_name" />
<result property="manageType" column="manage_type" /> <result property="manageType" column="manage_type" />
<result property="leasePrice" column="lease_price" /> <result property="leasePrice" column="lease_price" />
<result property="effTime" column="eff_time" /> <result property="effTime" column="eff_time" />
<result property="rentPrice" column="rent_price" /> <result property="rentPrice" column="rent_price" />
<result property="buyPrice" column="buy_price" /> <result property="buyPrice" column="buy_price" />
<result property="payRatio" column="pay_ratio" /> <result property="payRatio" column="pay_ratio" />
<result property="payPrice" column="pay_price" />
<result property="taxRatio" column="tax_ratio" />
<result property="level" column="level" /> <result property="level" column="level" />
<result property="ratedLoad" column="rated_load" /> <result property="ratedLoad" column="rated_load" />
<result property="testLoad" column="test_load" /> <result property="testLoad" column="test_load" />
@ -68,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="parentTwoLevelName" column="parentThreeLevelName" /> <result property="parentTwoLevelName" column="parentThreeLevelName" />
<result property="parentThreeLevelName" column="parentTwoLevelName" /> <result property="parentThreeLevelName" column="parentTwoLevelName" />
<result property="parentFourLevelName" column="parentOneLevelName" /> <result property="parentFourLevelName" column="parentOneLevelName" />
<result property="houseName" column="house_name" />
</resultMap> </resultMap>
<resultMap type="com.bonus.material.ma.vo.MaTypeConfigVo" id="MaTypeConfigVoResult"> <resultMap type="com.bonus.material.ma.vo.MaTypeConfigVo" id="MaTypeConfigVoResult">
@ -75,6 +82,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="typeName" column="type_name" /> <result property="typeName" column="type_name" />
<result property="parentId" column="parent_id" /> <result property="parentId" column="parent_id" />
<result property="level" column="level" /> <result property="level" column="level" />
<result property="houseId" column="house_id" />
<result property="houseName" column="house_name" />
<result property="parentOneLevelName" column="parentFourLevelName" /> <result property="parentOneLevelName" column="parentFourLevelName" />
<result property="parentTwoLevelName" column="parentThreeLevelName" /> <result property="parentTwoLevelName" column="parentThreeLevelName" />
<result property="parentThreeLevelName" column="parentTwoLevelName" /> <result property="parentThreeLevelName" column="parentTwoLevelName" />
@ -83,8 +92,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectTypeVo"> <sql id="selectTypeVo">
select select
type_id, type_name, parent_id, storage_num, type_code, model_code, unit_id, manage_type, lease_price, type_id, type_name, parent_id, storage_num, type_code, model_code, unit_id, unit_name, manage_type, lease_price,
eff_time, rent_price, buy_price, pay_ratio, level, rated_load, test_load, holding_time, warn_num, eff_time, rent_price, buy_price, pay_ratio, pay_price, tax_ratio, level, rated_load, test_load, holding_time, warn_num,
create_by, create_time, update_by, update_time, is_plan,is_ancuo, remark, fac_model, intelligent_code create_by, create_time, update_by, update_time, is_plan,is_ancuo, remark, fac_model, intelligent_code
from ma_type from ma_type
</sql> </sql>
@ -156,12 +165,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeCode != null">type_code,</if> <if test="typeCode != null">type_code,</if>
<if test="modelCode != null">model_code,</if> <if test="modelCode != null">model_code,</if>
<if test="unitId != null">unit_id,</if> <if test="unitId != null">unit_id,</if>
<if test="unitName != null">unit_name,</if>
<if test="manageType != null and manageType != ''">manage_type,</if> <if test="manageType != null and manageType != ''">manage_type,</if>
<if test="leasePrice != null">lease_price,</if> <if test="leasePrice != null">lease_price,</if>
<if test="effTime != null">eff_time,</if> <if test="effTime != null">eff_time,</if>
<if test="rentPrice != null">rent_price,</if> <if test="rentPrice != null">rent_price,</if>
<if test="buyPrice != null">buy_price,</if> <if test="buyPrice != null">buy_price,</if>
<if test="payRatio != null">pay_ratio,</if> <if test="payRatio != null">pay_ratio,</if>
<if test="payPrice != null">pay_price,</if>
<if test="taxRatio != null">tax_ratio,</if>
<if test="level != null">`level`,</if> <if test="level != null">`level`,</if>
<if test="ratedLoad != null">rated_load,</if> <if test="ratedLoad != null">rated_load,</if>
<if test="testLoad != null">test_load,</if> <if test="testLoad != null">test_load,</if>
@ -184,12 +196,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeCode != null">#{typeCode},</if> <if test="typeCode != null">#{typeCode},</if>
<if test="modelCode != null">#{modelCode},</if> <if test="modelCode != null">#{modelCode},</if>
<if test="unitId != null">#{unitId},</if> <if test="unitId != null">#{unitId},</if>
<if test="unitName != null">#{unitName},</if>
<if test="manageType != null and manageType != ''">#{manageType},</if> <if test="manageType != null and manageType != ''">#{manageType},</if>
<if test="leasePrice != null">#{leasePrice},</if> <if test="leasePrice != null">#{leasePrice},</if>
<if test="effTime != null">#{effTime},</if> <if test="effTime != null">#{effTime},</if>
<if test="rentPrice != null">#{rentPrice},</if> <if test="rentPrice != null">#{rentPrice},</if>
<if test="buyPrice != null">#{buyPrice},</if> <if test="buyPrice != null">#{buyPrice},</if>
<if test="payRatio != null">#{payRatio},</if> <if test="payRatio != null">#{payRatio},</if>
<if test="payPrice != null">#{payPrice},</if>
<if test="taxRatio != null">#{taxRatio},</if>
<if test="level != null">#{level},</if> <if test="level != null">#{level},</if>
<if test="ratedLoad != null">#{ratedLoad},</if> <if test="ratedLoad != null">#{ratedLoad},</if>
<if test="testLoad != null">#{testLoad},</if> <if test="testLoad != null">#{testLoad},</if>
@ -216,12 +231,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="typeCode != null">type_code = #{typeCode},</if> <if test="typeCode != null">type_code = #{typeCode},</if>
<if test="modelCode != null">model_code = #{modelCode},</if> <if test="modelCode != null">model_code = #{modelCode},</if>
<if test="unitId != null">unit_id = #{unitId},</if> <if test="unitId != null">unit_id = #{unitId},</if>
<if test="unitName != null">unit_name = #{unitName},</if>
<if test="manageType != null and manageType != ''">manage_type = #{manageType},</if> <if test="manageType != null and manageType != ''">manage_type = #{manageType},</if>
<if test="leasePrice != null">lease_price = #{leasePrice},</if> <if test="leasePrice != null">lease_price = #{leasePrice},</if>
<if test="effTime != null">eff_time = #{effTime},</if> <if test="effTime != null">eff_time = #{effTime},</if>
<if test="rentPrice != null">rent_price = #{rentPrice},</if> <if test="rentPrice != null">rent_price = #{rentPrice},</if>
<if test="buyPrice != null">buy_price = #{buyPrice},</if> <if test="buyPrice != null">buy_price = #{buyPrice},</if>
<if test="payRatio != null">pay_ratio = #{payRatio},</if> <if test="payRatio != null">pay_ratio = #{payRatio},</if>
<if test="payPrice != null">pay_price = #{payPrice},</if>
<if test="taxRatio != null">tax_ratio = #{taxRatio},</if>
<if test="level != null">`level` = #{level},</if> <if test="level != null">`level` = #{level},</if>
<if test="ratedLoad != null">rated_load = #{ratedLoad},</if> <if test="ratedLoad != null">rated_load = #{ratedLoad},</if>
<if test="testLoad != null">test_load = #{testLoad},</if> <if test="testLoad != null">test_load = #{testLoad},</if>
@ -262,11 +280,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT SELECT
a.*, -- 当前层级的所有字段 a.*, -- 当前层级的所有字段
b.type_name AS parentThreeLevelName, -- 父层级名称 b.type_name AS parentThreeLevelName, -- 父层级名称
c.type_name AS parentTwoLevelName, -- 祖父层级名称 c.type_name AS parentTwoLevelName, -- 祖父层级名称
d.type_name AS parentOneLevelName -- 曾祖父层级名称 d.type_name AS parentOneLevelName, -- 曾祖父层级名称
whi.house_name
FROM FROM
ma_type a ma_type a
LEFT JOIN
wh_house_set whs ON a.type_id = whs.type_id AND whs.del_flag = '0'
LEFT JOIN
wh_house_info whi ON whi.house_id = whs.house_id AND whs.del_flag = '0'
LEFT JOIN LEFT JOIN
ma_type b ON a.parent_id = b.type_id and b.del_flag = '0' -- 第一层,父类型 ma_type b ON a.parent_id = b.type_id and b.del_flag = '0' -- 第一层,父类型
LEFT JOIN LEFT JOIN
@ -352,15 +374,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.type_name AS parentFourLevelName, -- 当前层级名称 a.type_name AS parentFourLevelName, -- 当前层级名称
b.type_name AS parentThreeLevelName, -- 父层级名称 b.type_name AS parentThreeLevelName, -- 父层级名称
c.type_name AS parentTwoLevelName, -- 祖父层级名称 c.type_name AS parentTwoLevelName, -- 祖父层级名称
d.type_name AS parentOneLevelName -- 曾祖父层级名称 d.type_name AS parentOneLevelName, -- 曾祖父层级名称
whs.house_id,whi.house_name
FROM FROM
ma_type a ma_type a
LEFT JOIN LEFT JOIN
ma_type b ON a.parent_id = b.type_id and b.del_flag = '0' -- 第一层,父类型 wh_house_set whs ON a.type_id = whs.type_id AND whs.del_flag = '0'
LEFT JOIN LEFT JOIN
ma_type c ON b.parent_id = c.type_id and c.del_flag = '0' -- 第二层,祖父类型 wh_house_info whi ON whi.house_id = whs.house_id AND whs.del_flag = '0'
LEFT JOIN LEFT JOIN
ma_type d ON c.parent_id = d.type_id and d.del_flag = '0' -- 第三层,曾祖父类型 ma_type b ON a.parent_id = b.type_id AND b.del_flag = '0' -- 第一层,父类型
LEFT JOIN
ma_type c ON b.parent_id = c.type_id AND c.del_flag = '0' -- 第二层,祖父类型
LEFT JOIN
ma_type d ON c.parent_id = d.type_id AND d.del_flag = '0' -- 第三层,曾祖父类型
WHERE WHERE
a.del_flag = 0 AND a.`level` = '4' a.del_flag = 0 AND a.`level` = '4'
</select> </select>