禅道问题修复,领料单相关问题修复

This commit is contained in:
liux 2025-07-09 17:38:45 +08:00
parent e3fee8da6d
commit d6c8f0180e
14 changed files with 129 additions and 36 deletions

View File

@ -82,7 +82,7 @@ public class FetchMaterialController extends BaseController {
@GetMapping({"/page-detail"})
@ApiOperation("分页查询领料单明细")
public TableDataInfo pageFetchMaterialDetail(@Valid FetchMaterialDetailPageDTO dto) {
startPage();
// startPage();
return getDataTable(this.fetchMaterialService.pageFetchMaterialDetail(dto));
}

View File

@ -11,7 +11,7 @@ import com.bonus.common.core.web.domain.BaseEntity;
/**
* 领料单对象 ims_fetch_material
*
*
* @author xsheng
* @date 2025-07-07
*/
@ -74,6 +74,8 @@ public class FetchMaterial extends BaseEntity {
@ApiModelProperty(value = "领料人")
private Long fetchUserId;
private String fetchUser;
/** 审批状态(1待审核,2审批中,3审批通过,4审批不通过) */
@Excel(name = "审批状态(1待审核,2审批中,3审批通过,4审批不通过)")
@ApiModelProperty(value = "审批状态(1待审核,2审批中,3审批通过,4审批不通过)")

View File

@ -43,9 +43,10 @@ public class FetchMaterialCommitDTO {
@ApiModelProperty("领料时间")
private LocalDateTime fetchMaterialTime;
@ApiModelProperty("领料人")
private @NotNull(
message = "领料人不能为空!"
) Long fetchUserId;
private Long fetchUserId;
@ApiModelProperty("领料人")
private String fetchUser;
@ApiModelProperty("明细")
private @Valid
@Size(
@ -93,6 +94,16 @@ public class FetchMaterialCommitDTO {
return this.detailList;
}
public String getFetchUser() {
return fetchUser;
}
public FetchMaterialCommitDTO setFetchUser(String fetchUser) {
this.fetchUser = fetchUser;
return this;
}
public FetchMaterialCommitDTO setFetchMaterialId(final Long fetchMaterialId) {
this.fetchMaterialId = fetchMaterialId;
return this;

View File

@ -31,6 +31,8 @@ public class FetchMaterialPageDTO {
private LocalDateTime endTime;
@ApiModelProperty("领料人")
private Long fetchUserId;
@ApiModelProperty("领料人名称")
private String fetchUser;
@ApiModelProperty("制表开始时间")
private LocalDateTime crtimeStart;
@ApiModelProperty("制表结束时间")
@ -115,6 +117,16 @@ public class FetchMaterialPageDTO {
return this.areaAuth;
}
public String getFetchUser() {
return fetchUser;
}
public FetchMaterialPageDTO setFetchUser(String fetchUser) {
this.fetchUser = fetchUser;
return this;
}
public FetchMaterialPageDTO setFetchMaterialId(final String fetchMaterialId) {
this.fetchMaterialId = fetchMaterialId;
return this;

View File

@ -17,6 +17,9 @@ import java.util.List;
public class FetchMaterialSaveDTO {
@ApiModelProperty("领料单号")
private Long fetchMaterialId;
/** 领料单编号 */
private String fetchMaterialCode;
@ApiModelProperty("领料单标题")
private @NotBlank(
message = "领料单标题不能为空!"
@ -40,9 +43,10 @@ public class FetchMaterialSaveDTO {
@ApiModelProperty("领料时间")
private LocalDateTime fetchMaterialTime;
@ApiModelProperty("领料人")
private @NotNull(
message = "领料人不能为空!"
) Long fetchUserId;
private Long fetchUserId;
@ApiModelProperty("领料人")
private String fetchUser;
@ApiModelProperty("明细")
private @Valid List<FetchMaterialDetailSaveDTO> detailList;
@ -86,6 +90,25 @@ public class FetchMaterialSaveDTO {
return this.detailList;
}
public String getFetchUser() {
return fetchUser;
}
public String getFetchMaterialCode() {
return fetchMaterialCode;
}
public FetchMaterialSaveDTO setFetchMaterialCode(String fetchMaterialCode) {
this.fetchMaterialCode = fetchMaterialCode;
return this;
}
public FetchMaterialSaveDTO setFetchUser(String fetchUser) {
this.fetchUser = fetchUser;
return this;
}
public FetchMaterialSaveDTO setFetchMaterialId(final Long fetchMaterialId) {
this.fetchMaterialId = fetchMaterialId;
return this;

View File

@ -12,6 +12,8 @@ import java.util.List;
public class RefundGoodsAddDTO {
private Long refundGoodsId;
private String refundGoodsCode;
@ApiModelProperty("供应商id")
private Long supplierId;
@ApiModelProperty("退货时间")
@ -33,6 +35,8 @@ public class RefundGoodsAddDTO {
@ApiModelProperty("明细集合")
private List<RefundGoodsDetailAddDTO> detailList;
public Long getSupplierId() {
return this.supplierId;
}
@ -73,6 +77,15 @@ public class RefundGoodsAddDTO {
return refundGoodsId;
}
public String getRefundGoodsCode() {
return refundGoodsCode;
}
public RefundGoodsAddDTO setRefundGoodsCode(String refundGoodsCode) {
this.refundGoodsCode = refundGoodsCode;
return this;
}
public RefundGoodsAddDTO setRefundGoodsId(Long refundGoodsId) {
this.refundGoodsId = refundGoodsId;
return this;

View File

@ -19,6 +19,7 @@ import com.bonus.canteen.core.ims.vo.FetchMaterialDetailPageVO;
import com.bonus.canteen.core.ims.vo.FetchMaterialPageVO;
import com.bonus.common.core.exception.ServiceException;
import com.bonus.common.core.utils.DateUtils;
import com.bonus.common.core.utils.StringUtils;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.houqin.constant.DelFlagEnum;
import com.bonus.common.security.utils.SecurityUtils;
@ -83,8 +84,8 @@ public class FetchMaterialServiceImpl implements IFetchMaterialService {
FetchMaterial fetchMaterial = new FetchMaterial();
BeanUtil.copyProperties(content, fetchMaterial, new String[0]);
Long fetchMaterialId = content.getFetchMaterialId();
String fetchMaterialCode = NoGenerateUtils.generateFetchMaterialCode();
if (fetchMaterialId == null) {
String fetchMaterialCode = NoGenerateUtils.generateFetchMaterialCode();
// fetchMaterialId = CustomIdGenerateUtil.generateFetchMaterialId();
fetchMaterial.setFetchMaterialId(fetchMaterialId);
fetchMaterial.setOutNum(BigDecimal.ZERO);
@ -93,10 +94,14 @@ public class FetchMaterialServiceImpl implements IFetchMaterialService {
fetchMaterial.setCreateTime(DateUtils.getNowDate());
this.fetchMaterialMapper.insertFetchMaterial(fetchMaterial);
} else {
String code = fetchMaterial.getFetchMaterialCode();
if(StringUtils.isEmpty(code)){
throw new ServiceException("领料单号不能为空");
}
fetchMaterial.setUpdateBy(SecurityUtils.getUsername());
fetchMaterial.setUpdateTime(DateUtils.getNowDate());
this.fetchMaterialMapper.updateFetchMaterial(fetchMaterial);
this.fetchMaterialMapper.deleteFetchMaterialByFetchMaterialId(fetchMaterial.getFetchMaterialId());
this.FetchMaterialDetailMapper.deleteFetchMaterialDetailByFetchMaterialId(fetchMaterial.getFetchMaterialId());
}
List<FetchMaterialDetailSaveDTO> detailList = content.getDetailList();
Iterator<FetchMaterialDetailSaveDTO> var5 = detailList.iterator();
@ -106,7 +111,7 @@ public class FetchMaterialServiceImpl implements IFetchMaterialService {
BeanUtil.copyProperties(detail, drpFetchMaterialDetail, new String[0]);
drpFetchMaterialDetail.setFetchMaterialId(fetchMaterialId);
drpFetchMaterialDetail.setOutCount(BigDecimal.ZERO);
drpFetchMaterialDetail.setFetchMaterialCode(fetchMaterialCode);
drpFetchMaterialDetail.setFetchMaterialCode(fetchMaterial.getFetchMaterialCode());
drpFetchMaterialDetail.setFetchMaterialId(fetchMaterial.getFetchMaterialId());
drpFetchMaterialDetail.setCreateTime(DateUtils.getNowDate());
drpFetchMaterialDetail.setCreateBy(SecurityUtils.getUsername());

View File

@ -17,6 +17,7 @@ import com.bonus.canteen.core.ims.utils.NoGenerateUtils;
import com.bonus.canteen.core.ims.vo.*;
import com.bonus.common.core.exception.ServiceException;
import com.bonus.common.core.utils.DateUtils;
import com.bonus.common.core.utils.StringUtils;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.houqin.constant.DelFlagEnum;
import com.bonus.common.houqin.utils.LeBeanUtil;
@ -88,6 +89,10 @@ public class RefundGoodsServiceImpl implements IRefundGoodsService {
drpRefundGoods.setStatus(DrpCommitStatusEnum.COMMIT.key());
refundGoodsMapper.insertRefundGoods(drpRefundGoods);
}else{
String code = drpRefundGoods.getRefundGoodsCode();
if(StringUtils.isEmpty(code)){
throw new ServiceException("退货单号不能为空");
}
drpRefundGoods.setUpdateBy(SecurityUtils.getUsername());
drpRefundGoods.setUpdateTime(DateUtils.getNowDate());
refundGoodsMapper.updateRefundGoods(drpRefundGoods);

View File

@ -24,9 +24,9 @@ public class FetchMaterialDetailPageVO {
@ApiModelProperty("货品编码")
private String materialCode;
@ApiModelProperty("货品类别id")
private Long categoryId;
private Long materialTypeId;
@ApiModelProperty("货品类别")
private String categoryName;
private String materialTypeName;
@ApiModelProperty("货品单位id")
private Long unitId;
@ApiModelProperty("货品单位")
@ -84,13 +84,7 @@ public class FetchMaterialDetailPageVO {
return this.materialCode;
}
public Long getCategoryId() {
return this.categoryId;
}
public String getCategoryName() {
return this.categoryName;
}
public Long getUnitId() {
return this.unitId;
@ -141,6 +135,24 @@ public class FetchMaterialDetailPageVO {
return this.ifRegister;
}
public Long getMaterialTypeId() {
return materialTypeId;
}
public FetchMaterialDetailPageVO setMaterialTypeId(Long materialTypeId) {
this.materialTypeId = materialTypeId;
return this;
}
public String getMaterialTypeName() {
return materialTypeName;
}
public FetchMaterialDetailPageVO setMaterialTypeName(String materialTypeName) {
this.materialTypeName = materialTypeName;
return this;
}
public FetchMaterialDetailPageVO setFetchDetailId(final Long fetchDetailId) {
this.fetchDetailId = fetchDetailId;
return this;
@ -171,15 +183,6 @@ public class FetchMaterialDetailPageVO {
return this;
}
public FetchMaterialDetailPageVO setCategoryId(final Long categoryId) {
this.categoryId = categoryId;
return this;
}
public FetchMaterialDetailPageVO setCategoryName(final String categoryName) {
this.categoryName = categoryName;
return this;
}
public FetchMaterialDetailPageVO setUnitId(final Long unitId) {
this.unitId = unitId;

View File

@ -13,6 +13,9 @@ import java.time.LocalDateTime;
public class FetchMaterialPageVO {
@ApiModelProperty("领料单号")
private String fetchMaterialId;
@ApiModelProperty("领料单号")
private String fetchMaterialCode;
@ApiModelProperty("领料单标题")
private String title;
@ApiModelProperty("提交状态(1待提交2已提交)")
@ -174,6 +177,16 @@ public class FetchMaterialPageVO {
return this.curUserApprove;
}
public String getFetchMaterialCode() {
return fetchMaterialCode;
}
public FetchMaterialPageVO setFetchMaterialCode(String fetchMaterialCode) {
this.fetchMaterialCode = fetchMaterialCode;
return this;
}
public FetchMaterialPageVO setFetchMaterialId(final String fetchMaterialId) {
this.fetchMaterialId = fetchMaterialId;
return this;

View File

@ -187,7 +187,7 @@ public class KitchenHomePageerviceImpl implements IKitchenHomePageService {
throw new ServiceException("开始时间不能大于结束时间");
}
}else{
deviceStartDate = LocalDate.now().plusDays(-1);
deviceStartDate = LocalDate.now();
deviceEndTime = LocalDate.now();
}
List<IndexMapCountVO> deviceStatus = kitchenHomePageMapper.getDeviceStatusCount(deviceStartDate.toString(), deviceEndTime.toString());
@ -225,7 +225,7 @@ public class KitchenHomePageerviceImpl implements IKitchenHomePageService {
throw new ServiceException("留样开始时间不能大于结束时间");
}
} else {
sampleStartDate = LocalDate.now().plusDays(-1);
sampleStartDate = LocalDate.now();
sampleEndTime = LocalDate.now();
}
List<IndexMapCountVO> sampleRetention = kitchenHomePageMapper.getSampleRetentionCount(sampleStartDate.toString(), sampleEndTime.toString());
@ -280,14 +280,14 @@ public class KitchenHomePageerviceImpl implements IKitchenHomePageService {
IndexMapCountVO indexMapCountVO = new IndexMapCountVO();
int count = kitchenHomePageMapper.getCountNum(kitchenDeviceSensorMetric,"max" );
indexMapCountVO.setCount(count);
indexMapCountVO.setName(name + "过高");
indexMapCountVO.setName(name + ":过高");
environmentWarning.add(indexMapCountVO);
}
if(!isZeroMin){
IndexMapCountVO indexMapCountVO = new IndexMapCountVO();
int count = kitchenHomePageMapper.getCountNum(kitchenDeviceSensorMetric,"min" );
indexMapCountVO.setCount(count);
indexMapCountVO.setName(name + "过低");
indexMapCountVO.setName(name + ":过低");
environmentWarning.add(indexMapCountVO);
}
}

View File

@ -112,8 +112,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.inventory_id,
b.material_name,
b.material_code,
b.material_type_id as categoryId,
d.material_type_name as materialName,
b.material_type_id ,
d.material_type_name ,
b.unit_id,
c.unit_name,
e.material_num inventoryNum,

View File

@ -70,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null">warehouse_id,</if>
<if test="fetchMaterialTime != null">fetch_material_time,</if>
<if test="fetchUserId != null">fetch_user_id,</if>
<if test="fetchUser != null">fetch_user,</if>
<if test="approveStatus != null">approve_status,</if>
<if test="processInstanceId != null">process_instance_id,</if>
<if test="approveBy != null">approve_by,</if>
@ -92,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null">#{warehouseId},</if>
<if test="fetchMaterialTime != null">#{fetchMaterialTime},</if>
<if test="fetchUserId != null">#{fetchUserId},</if>
<if test="fetchUser != null">#{fetchUser},</if>
<if test="approveStatus != null">#{approveStatus},</if>
<if test="processInstanceId != null">#{processInstanceId},</if>
<if test="approveBy != null">#{approveBy},</if>
@ -118,6 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="fetchMaterialTime != null">fetch_material_time = #{fetchMaterialTime},</if>
<if test="fetchUserId != null">fetch_user_id = #{fetchUserId},</if>
<if test="fetchUser != null">fetch_user = #{fetchUser},</if>
<if test="approveStatus != null">approve_status = #{approveStatus},</if>
<if test="processInstanceId != null">process_instance_id = #{processInstanceId},</if>
<if test="approveBy != null">approve_by = #{approveBy},</if>
@ -145,6 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getPageList" resultType="com.bonus.canteen.core.ims.vo.FetchMaterialPageVO">
SELECT a.fetch_material_id,
a.fetch_material_code,
a.title,
a.commit_status,
a.fetch_status,
@ -159,6 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
su.user_name AS fetch_user_name,
a.approve_status,
a.process_instance_id,
a.fetch_user,
a.approve_by,
a.approve_time,
a.approve_remark,

View File

@ -41,12 +41,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT COUNT(record_id) FROM kitchen_device_sensor_record
WHERE device_type = #{beans.deviceType} AND measure_code = #{beans.measureCode}
<if test="type == 'max'">
and #{beans.measureMaxValue} > measure_data
and measure_data > #{beans.measureMaxValue}
</if>
<if test="type == 'min'">
and measure_data > #{beans.measureMinValue}
and #{beans.measureMinValue} > measure_data
</if>
and DATE(create_time) = CURRENT_DATE()
</select>
<select id="getAlarmCountNum" resultType="int">