基础数据的BUG修改

This commit is contained in:
秦鸿展
2026-02-07 17:22:11 +08:00
parent e7162e1877
commit 244b8d7e6e
8 changed files with 69 additions and 7 deletions
@@ -158,6 +158,7 @@ public class MaterialBaseInfo extends BaseVOEntity{
@ApiModelProperty("单位数量") @ApiModelProperty("单位数量")
@Excel(name = "单位数量") @Excel(name = "单位数量")
@TableField(exist = false)
private BigDecimal unitNumber; private BigDecimal unitNumber;
@ApiModelProperty("是否公用: 1-是 2-否") @ApiModelProperty("是否公用: 1-是 2-否")
@@ -190,36 +191,42 @@ public class MaterialBaseInfo extends BaseVOEntity{
*/ */
@ApiModelProperty("商品名称") @ApiModelProperty("商品名称")
@Excel(name = "商品名称") @Excel(name = "商品名称")
@TableField(exist = false)
private String commodityName; private String commodityName;
/** /**
* 商品编码 * 商品编码
*/ */
@ApiModelProperty("商品编码") @ApiModelProperty("商品编码")
@Excel(name = "商品编码") @Excel(name = "商品编码")
@TableField(exist = false)
private String commodityNo; private String commodityNo;
/** /**
* 料号 * 料号
*/ */
@ApiModelProperty("料号") @ApiModelProperty("料号")
@Excel(name = "料号") @Excel(name = "料号")
@TableField(exist = false)
private String materialNo; private String materialNo;
/** /**
* 规格型号 * 规格型号
*/ */
@ApiModelProperty("规格型号") @ApiModelProperty("规格型号")
@Excel(name = "规格型号") @Excel(name = "规格型号")
@TableField(exist = false)
private String specificationModel; private String specificationModel;
/** /**
* Invoice No * Invoice No
*/ */
@ApiModelProperty("Invoice No") @ApiModelProperty("Invoice No")
@Excel(name = "Invoice No") @Excel(name = "Invoice No")
@TableField(exist = false)
private String invoiceNo; private String invoiceNo;
/** /**
* 升 * 升
*/ */
@ApiModelProperty("") @ApiModelProperty("")
@Excel(name = "") @Excel(name = "")
@TableField(exist = false)
private String liter; private String liter;
/** /**
@@ -227,6 +234,7 @@ public class MaterialBaseInfo extends BaseVOEntity{
*/ */
@ApiModelProperty("尺寸") @ApiModelProperty("尺寸")
@Excel(name = "尺寸") @Excel(name = "尺寸")
@TableField(exist = false)
private String size; private String size;
/** /**
@@ -234,20 +242,23 @@ public class MaterialBaseInfo extends BaseVOEntity{
*/ */
@ApiModelProperty("申报单位") @ApiModelProperty("申报单位")
@Excel(name = "申报单位") @Excel(name = "申报单位")
@TableField(exist = false)
private String declareUnit; private String declareUnit;
/** /**
* Batch Ref NOs * Batch Ref NO's
*/ */
@ApiModelProperty("Batch Ref NOs") @ApiModelProperty("Batch Ref NO's")
@Excel(name = "Batch Ref NOs") @Excel(name = "Batch Ref NO's")
@TableField(exist = false)
private String batchRefNo; private String batchRefNo;
/** /**
* Sheet Ref NOs * Sheet Ref NO's
*/ */
@ApiModelProperty("Sheet Ref NOs") @ApiModelProperty("Sheet Ref NO's")
@Excel(name = "Sheet Ref NOs") @Excel(name = "Sheet Ref NO's")
@TableField(exist = false)
private String sheetRefNo; private String sheetRefNo;
/** /**
@@ -255,6 +266,7 @@ public class MaterialBaseInfo extends BaseVOEntity{
*/ */
@ApiModelProperty("原产国") @ApiModelProperty("原产国")
@Excel(name = "原产国") @Excel(name = "原产国")
@TableField(exist = false)
private String countryOfOrigin; private String countryOfOrigin;
/** /**
@@ -262,6 +274,7 @@ public class MaterialBaseInfo extends BaseVOEntity{
*/ */
@ApiModelProperty("箱号/卡板号") @ApiModelProperty("箱号/卡板号")
@Excel(name = "箱号/卡板号") @Excel(name = "箱号/卡板号")
@TableField(exist = false)
private String casePalletNo; private String casePalletNo;
/** /**
@@ -276,6 +289,7 @@ public class MaterialBaseInfo extends BaseVOEntity{
*/ */
@ApiModelProperty("申报数量") @ApiModelProperty("申报数量")
@Excel(name = "申报数量") @Excel(name = "申报数量")
@TableField(exist = false)
private Double declareQuantity; private Double declareQuantity;
/** /**
@@ -283,6 +297,7 @@ public class MaterialBaseInfo extends BaseVOEntity{
*/ */
@ApiModelProperty("箱数") @ApiModelProperty("箱数")
@Excel(name = "箱数") @Excel(name = "箱数")
@TableField(exist = false)
private Double caseCount; private Double caseCount;
/** /**
@@ -290,6 +305,7 @@ public class MaterialBaseInfo extends BaseVOEntity{
*/ */
@ApiModelProperty("件数") @ApiModelProperty("件数")
@Excel(name = "件数") @Excel(name = "件数")
@TableField(exist = false)
private Double pieceCount; private Double pieceCount;
/** /**
@@ -297,6 +313,7 @@ public class MaterialBaseInfo extends BaseVOEntity{
*/ */
@ApiModelProperty("出库数量") @ApiModelProperty("出库数量")
@Excel(name = "出库数量") @Excel(name = "出库数量")
@TableField(exist = false)
private Double outboundQuantity; private Double outboundQuantity;
/** /**
@@ -304,6 +321,7 @@ public class MaterialBaseInfo extends BaseVOEntity{
*/ */
@ApiModelProperty("总净重(KG)") @ApiModelProperty("总净重(KG)")
@Excel(name = "总净重(KG)") @Excel(name = "总净重(KG)")
@TableField(exist = false)
private Double totalNetWeight; private Double totalNetWeight;
/** /**
@@ -311,6 +329,7 @@ public class MaterialBaseInfo extends BaseVOEntity{
*/ */
@ApiModelProperty("总毛重(KG)") @ApiModelProperty("总毛重(KG)")
@Excel(name = "总毛重(KG)") @Excel(name = "总毛重(KG)")
@TableField(exist = false)
private Double totalGrossWeight; private Double totalGrossWeight;
/** /**
@@ -318,6 +337,7 @@ public class MaterialBaseInfo extends BaseVOEntity{
*/ */
@ApiModelProperty("总体积(CBM)") @ApiModelProperty("总体积(CBM)")
@Excel(name = "总体积(CBM)") @Excel(name = "总体积(CBM)")
@TableField(exist = false)
private Double totalVolume; private Double totalVolume;
/** /**
@@ -325,12 +345,14 @@ public class MaterialBaseInfo extends BaseVOEntity{
*/ */
@ApiModelProperty("总面积(SQM)") @ApiModelProperty("总面积(SQM)")
@Excel(name = "总面积(SQM)") @Excel(name = "总面积(SQM)")
@TableField(exist = false)
private Double totalArea; private Double totalArea;
/** /**
* 总价 * 总价
*/ */
@ApiModelProperty("总价") @ApiModelProperty("总价")
@Excel(name = "总价") @Excel(name = "总价")
@TableField(exist = false)
private Double totalAmount; private Double totalAmount;
/** /**
@@ -338,6 +360,7 @@ public class MaterialBaseInfo extends BaseVOEntity{
*/ */
@ApiModelProperty("单位") @ApiModelProperty("单位")
@Excel(name = "单位") @Excel(name = "单位")
@TableField(exist = false)
private String unit; private String unit;
@@ -5,6 +5,7 @@ import com.mhd.basic.domain.batch.repository.po.BatchPO;
import com.mhd.common.core.annotation.Excel; import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.handler.ListTypeHandler; import com.mhd.common.core.handler.ListTypeHandler;
import com.mhd.common.core.web.domain.BaseVOEntity; import com.mhd.common.core.web.domain.BaseVOEntity;
import com.mhd.system.api.domain.*;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
@@ -360,4 +361,19 @@ public class MaterialBaseInfoPO extends BaseVOEntity{
@ApiModelProperty("法定第二单位") @ApiModelProperty("法定第二单位")
private String statutorySecondUnit; private String statutorySecondUnit;
@ApiModelProperty("商品规则")
private MaterialGoodsRuleFeign materialGoodsRule;
@ApiModelProperty("公共信息")
private MaterialCommonFeign materialCommon;
@ApiModelProperty("仓库控制信息")
private MaterialWarehouseControlFeign materialWarehouseControl;
@ApiModelProperty("库存预警信息")
private List<MaterialInventoryWarningFeign> materialInventoryWarningList;
@ApiModelProperty("条码信息")
private List<MaterialBarCodeFeign> materialBarCodeList;
} }
@@ -68,6 +68,10 @@ public class PackPO extends BaseVOEntity{
@Excel(name = "是否作废: 1-否 2-是") @Excel(name = "是否作废: 1-否 2-是")
private Integer nullify; private Integer nullify;
@ApiModelProperty("包装单位(取第一条包装详情的单位名称)")
@Excel(name = "包装单位")
private String unitName;
@ApiModelProperty("包装明细") @ApiModelProperty("包装明细")
private List<PackDetailPO> packDetailList; private List<PackDetailPO> packDetailList;
@@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="openingUp" column="opening_up" /> <result property="openingUp" column="opening_up" />
<result property="nullify" column="nullify" /> <result property="nullify" column="nullify" />
<result property="unitName" column="unit_name" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createByName" column="create_by_name" /> <result property="createByName" column="create_by_name" />
@@ -27,7 +28,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectPackPo"> <sql id="selectPackPo">
select pack_id, organization_id, organization_name, top_organization_id, shipper_id, shipper_name, pack_code, pack_name, remark, opening_up, nullify, create_time, create_by, create_by_name, update_time, update_by, update_by_name, del_flag from pack select a.pack_id, a.organization_id, a.organization_name, a.top_organization_id, a.shipper_id, a.shipper_name, a.pack_code, a.pack_name, a.remark, a.opening_up, a.nullify, a.create_time, a.create_by, a.create_by_name, a.update_time, a.update_by, a.update_by_name, a.del_flag,
(SELECT b.name FROM (SELECT name, pack_id FROM pack_detail WHERE pack_id = a.pack_id AND del_flag = 1 ORDER BY pack_detail_id) b WHERE ROWNUM = 1) as unit_name
from pack a
</sql> </sql>
<sql id="selectPackPo1"> <sql id="selectPackPo1">
@@ -157,6 +157,10 @@ public class CommonApplicationService {
UserDO queryAccount = new UserDO(); UserDO queryAccount = new UserDO();
queryAccount.setTopOrganizationId(topOrganizationId); queryAccount.setTopOrganizationId(topOrganizationId);
queryAccount.setUserAccount(userDO.getUserAccount()); queryAccount.setUserAccount(userDO.getUserAccount());
// 如果指定了角色,只检查相同角色的用户
if (StrUtil.isNotEmpty(userDO.getRoleCode())) {
queryAccount.setRoleCode(userDO.getRoleCode());
}
userPo = userDomainService.findByTopOrganizationIdAndUserAccount(queryAccount); userPo = userDomainService.findByTopOrganizationIdAndUserAccount(queryAccount);
} }
//根据手机号查询 //根据手机号查询
@@ -165,6 +169,10 @@ public class CommonApplicationService {
UserDO queryPhone = new UserDO(); UserDO queryPhone = new UserDO();
queryPhone.setTopOrganizationId(topOrganizationId); queryPhone.setTopOrganizationId(topOrganizationId);
queryPhone.setUserPhone(userDO.getUserPhone()); queryPhone.setUserPhone(userDO.getUserPhone());
// 如果指定了角色,只检查相同角色的用户
if (StrUtil.isNotEmpty(userDO.getRoleCode())) {
queryPhone.setRoleCode(userDO.getRoleCode());
}
userPoTwo = userDomainService.findByTopOrganizationIdAndUserPhone(queryPhone); userPoTwo = userDomainService.findByTopOrganizationIdAndUserPhone(queryPhone);
} }
//根据身份证号查询 //根据身份证号查询
@@ -140,6 +140,9 @@
<include refid="selectUserVo"/> <include refid="selectUserVo"/>
and a.top_organization_id = #{topOrganizationId} and a.top_organization_id = #{topOrganizationId}
and a.user_account = #{userAccount} and a.user_account = #{userAccount}
<if test="roleCode != null and roleCode != ''">
and a.role_code = #{roleCode}
</if>
<if test="userId !=null and userId !='' "> <if test="userId !=null and userId !='' ">
and a.user_id != #{userId} and a.user_id != #{userId}
</if> </if>
@@ -183,6 +186,9 @@
</if> </if>
and a.user_phone = #{userPhone} and a.user_phone = #{userPhone}
and a.top_organization_id = #{topOrganizationId} and a.top_organization_id = #{topOrganizationId}
<if test="roleCode != null and roleCode != ''">
and a.role_code = #{roleCode}
</if>
<if test="userId !=null and userId !='' "> <if test="userId !=null and userId !='' ">
and a.user_id != #{userId} and a.user_id != #{userId}
</if> </if>
@@ -92,6 +92,7 @@ public class MaterialInventoryWarningImpl extends ServiceImpl<MaterialInventoryW
materialInventoryWarning.setCreateBy(loginUser.getUserid()); materialInventoryWarning.setCreateBy(loginUser.getUserid());
materialInventoryWarning.setCreateByName(loginUser.getUsername()); materialInventoryWarning.setCreateByName(loginUser.getUsername());
materialInventoryWarning.setCreateTime(new Date()); materialInventoryWarning.setCreateTime(new Date());
materialInventoryWarning.setDelFlag(1); // 设置删除标志为1(正常)
materialInventoryWarningList.add(materialInventoryWarning); materialInventoryWarningList.add(materialInventoryWarning);
} }
@@ -240,6 +240,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="queryList" parameterType="com.mhd.wms.domain.materialBaseInfo.repository.todo.MaterialBaseInfoDO" resultMap="MaterialBaseInfoResult"> <select id="queryList" parameterType="com.mhd.wms.domain.materialBaseInfo.repository.todo.MaterialBaseInfoDO" resultMap="MaterialBaseInfoResult">
<include refid="selectMaterialBaseInfoPo"/> <include refid="selectMaterialBaseInfoPo"/>
<include refid="selectMaterialBaseInfoPo1"/> <include refid="selectMaterialBaseInfoPo1"/>
order by create_time desc
</select> </select>
<select id="selectOneByID" parameterType="java.lang.Long" resultMap="MaterialBaseInfoResult"> <select id="selectOneByID" parameterType="java.lang.Long" resultMap="MaterialBaseInfoResult">