cf4bb5e0 康伟

kangwei : 修改药剂入库接口

1 个父辈 cfed6045
......@@ -14,15 +14,14 @@ import com.skua.core.context.BaseContextHandler;
import com.skua.core.query.QueryGenerator;
import com.skua.core.util.ConvertUtils;
import com.skua.modules.erp.entity.MaterialIN;
import com.skua.modules.erp.entity.PurchasePlan;
import com.skua.modules.erp.service.IMaterialINService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.skua.modules.erp.vo.MaterialINVO;
import com.skua.modules.erp.vo.PurchaseContractVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
......@@ -74,8 +73,28 @@ public class MaterialINController {
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
Result<IPage<MaterialIN>> result = new Result<IPage<MaterialIN>>();
QueryWrapper<MaterialIN> queryWrapper = QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap());
QueryWrapper<MaterialIN> queryWrapper = new QueryWrapper();// QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap());
Page<MaterialIN> page = new Page<MaterialIN>(pageNo, pageSize);
if(StringUtils.isNotBlank(materialIN.getDepartId())){
queryWrapper.eq("depart_id",materialIN.getDepartId());
}
if(StringUtils.isNotBlank(materialIN.getAuditStatus())){
queryWrapper.eq("audit_status",materialIN.getAuditStatus());
}
if(StringUtils.isNotBlank(materialIN.getConfirmStatus())){
queryWrapper.eq("confirm_status",materialIN.getConfirmStatus());
}
if(StringUtils.isNotBlank(materialIN.getGoodCode())){
queryWrapper.like("good_code",materialIN.getGoodCode());
}
if(StringUtils.isNotBlank(materialIN.getStartTime())){
queryWrapper.ge("arrive_time",materialIN.getStartTime());
}
if(StringUtils.isNotBlank(materialIN.getEndTime())){
queryWrapper.le("arrive_time",materialIN.getEndTime());
}
IPage<MaterialIN> pageList = materialINService.page(page, queryWrapper);
result.setSuccess(true);
result.setResult(pageList);
......@@ -89,8 +108,26 @@ public class MaterialINController {
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
Result<IPage<MaterialIN>> result = new Result<IPage<MaterialIN>>();
QueryWrapper<MaterialIN> queryWrapper = QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap());
QueryWrapper<MaterialIN> queryWrapper = new QueryWrapper();//QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap());
Page<MaterialIN> page = new Page<MaterialIN>(pageNo, pageSize);
if(StringUtils.isNotBlank(materialIN.getDepartId())){
queryWrapper.eq("depart_id",materialIN.getDepartId());
}
if(StringUtils.isNotBlank(materialIN.getAuditStatus())){
queryWrapper.eq("audit_status",materialIN.getAuditStatus());
}
if(StringUtils.isNotBlank(materialIN.getConfirmStatus())){
queryWrapper.eq("confirm_status",materialIN.getConfirmStatus());
}
if(StringUtils.isNotBlank(materialIN.getGoodCode())){
queryWrapper.like("good_code",materialIN.getGoodCode());
}
if(StringUtils.isNotBlank(materialIN.getStartTime())){
queryWrapper.ge("arrive_time",materialIN.getStartTime());
}
if(StringUtils.isNotBlank(materialIN.getEndTime())){
queryWrapper.le("arrive_time",materialIN.getEndTime());
}
IPage<MaterialIN> pageList = materialINService.page(page, queryWrapper);
result.setSuccess(true);
result.setResult(pageList);
......
......@@ -58,6 +58,7 @@ public class MaterialIN {
/**收货人*/
@Excel(name = "收货人", width = 15)
@ApiModelProperty(value = "收货人")
@Dict(dictTable = "sys_user", dicCode="id", dicText = "realname")
private String receiver;
@Excel(name = "物料类别", width = 15)
......@@ -134,9 +135,12 @@ public class MaterialIN {
/**审批状态:0 未发布 1 已发布(待审核)2 审核驳回 3 审核通过*/
@Excel(name = "审批状态:0 未发布 1 已发布(待审核)2 审核驳回 3 审核通过", width = 15)
@ApiModelProperty(value = "审批状态:0 未发布 1 已发布(待审核)2 审核驳回 3 审核通过")
@Dict( dicCode="purchase_plan_status")
@Dict( dicCode="audit_status")
private String auditStatus;
/**审批意见*/
@ApiModelProperty(value = "审批意见")
private String approveMessage;
@ApiModelProperty(value = "申请人")
private String applyUser;
......@@ -180,4 +184,11 @@ public class MaterialIN {
@Excel(name = "删除标识,0:正常,1:删除", width = 15)
@ApiModelProperty(value = "删除标识,0:正常,1:删除")
private Integer delFlag;
@TableField(exist = false)
@ApiModelProperty(value = "结束时间")
private String endTime;
@TableField(exist = false)
@ApiModelProperty(value = "开始时间")
private String startTime;
}
......
......@@ -2,4 +2,13 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.skua.modules.erp.mapper.MaterialAcceptanceFormMapper">
<select id="queryByList" resultType="com.skua.modules.erp.vo.PurchasePlanItemVO">
select
t.arrive_time '到货日期', t.purchase_num '数量',t.measuring_unit '单位' ,
f.appearance_info '外观情况',f.matched_info '匹配情况' ,f.handle_msg '处理意见',f.sender_sign , f.receiver_sign,f.remark ,
t.sparepart_name,t.sparepart_code ,t.sparepart_type,t.specification ,t.depart_id ,
from erp_material_in t
left join erp_material_acceptance_form f on t.id = f.id
where t.supplier_id = 100 and t.depart_id = 'af880d6a13404a67825e94bc0f2f3808'
</select>
</mapper>
\ No newline at end of file
......
......@@ -2,4 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.skua.modules.erp.mapper.MaterialINMapper">
<!--查询 入库单 -->
<select id="queryByList" resultType="com.skua.modules.erp.entity.MaterialIN">
select t.*
from erp_material_in t
where t.supplier_id = 100 and t.depart_id = 'af880d6a13404a67825e94bc0f2f3808'
</select>
</mapper>
\ No newline at end of file
......
......@@ -120,7 +120,7 @@ public class DistributContractServiceImpl extends ServiceImpl<DistributContractM
distributContractVO.setStatus( "3" );
}
if("2".equals( distributContractVO.getApproveState() )){
distributContractVO.setStatus( "4" );
distributContractVO.setStatus( "2" );
}
this.baseMapper.updateById( distributContractVO ) ;
......
......@@ -32,7 +32,7 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia
materialINVO.setAuditStatus( "3" );
}
if("2".equals( materialINVO.getApproveState() )){
materialINVO.setAuditStatus( "4" );
materialINVO.setAuditStatus( "2" );
}
this.baseMapper.updateById( materialINVO ) ;
......
......@@ -127,7 +127,7 @@ public class PurchasePlanServiceImpl extends ServiceImpl<PurchasePlanMapper, Pur
purchasePlanVO.setStatus( "3" );
}
if("2".equals( purchasePlanVO.getApproveState() )){
purchasePlanVO.setStatus( "4" );
purchasePlanVO.setStatus( "2" );
//发送入库单据,物料库存增加
warehousing = true;
}
......
......@@ -14,10 +14,7 @@ import lombok.experimental.Accessors;
@ApiModel(value="MaterialINVO查询对象", description="MaterialINVO查询对象")
public class MaterialINVO extends MaterialIN {
/**审批意见*/
@TableField(exist=false)
@ApiModelProperty(value = "审批意见")
private String approveMessage;
/**审批状态*/
@TableField(exist=false)
@ApiModelProperty(value = "审批状态 1通过2不通过")
......
package com.skua.modules.erp.vo;
/**
* @auther kangwei
* @create 2024-09-30-9:57
*/
public class PurchasePlanItemVO {
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!