kangwei : 修改药剂入库接口
正在显示
9 个修改的文件
包含
80 行增加
和
12 行删除
... | @@ -14,15 +14,14 @@ import com.skua.core.context.BaseContextHandler; | ... | @@ -14,15 +14,14 @@ import com.skua.core.context.BaseContextHandler; |
14 | import com.skua.core.query.QueryGenerator; | 14 | import com.skua.core.query.QueryGenerator; |
15 | import com.skua.core.util.ConvertUtils; | 15 | import com.skua.core.util.ConvertUtils; |
16 | import com.skua.modules.erp.entity.MaterialIN; | 16 | import com.skua.modules.erp.entity.MaterialIN; |
17 | import com.skua.modules.erp.entity.PurchasePlan; | ||
18 | import com.skua.modules.erp.service.IMaterialINService; | 17 | import com.skua.modules.erp.service.IMaterialINService; |
19 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | 18 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
20 | import com.baomidou.mybatisplus.core.metadata.IPage; | 19 | import com.baomidou.mybatisplus.core.metadata.IPage; |
21 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 20 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
22 | import com.skua.modules.erp.vo.MaterialINVO; | 21 | import com.skua.modules.erp.vo.MaterialINVO; |
23 | import com.skua.modules.erp.vo.PurchaseContractVO; | ||
24 | import lombok.extern.slf4j.Slf4j; | 22 | import lombok.extern.slf4j.Slf4j; |
25 | 23 | ||
24 | import org.apache.commons.lang3.StringUtils; | ||
26 | import org.jeecgframework.poi.excel.ExcelImportUtil; | 25 | import org.jeecgframework.poi.excel.ExcelImportUtil; |
27 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; | 26 | import org.jeecgframework.poi.excel.def.NormalExcelConstants; |
28 | import org.jeecgframework.poi.excel.entity.ExportParams; | 27 | import org.jeecgframework.poi.excel.entity.ExportParams; |
... | @@ -74,8 +73,28 @@ public class MaterialINController { | ... | @@ -74,8 +73,28 @@ public class MaterialINController { |
74 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | 73 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
75 | HttpServletRequest req) { | 74 | HttpServletRequest req) { |
76 | Result<IPage<MaterialIN>> result = new Result<IPage<MaterialIN>>(); | 75 | Result<IPage<MaterialIN>> result = new Result<IPage<MaterialIN>>(); |
77 | QueryWrapper<MaterialIN> queryWrapper = QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap()); | 76 | QueryWrapper<MaterialIN> queryWrapper = new QueryWrapper();// QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap()); |
78 | Page<MaterialIN> page = new Page<MaterialIN>(pageNo, pageSize); | 77 | Page<MaterialIN> page = new Page<MaterialIN>(pageNo, pageSize); |
78 | |||
79 | if(StringUtils.isNotBlank(materialIN.getDepartId())){ | ||
80 | queryWrapper.eq("depart_id",materialIN.getDepartId()); | ||
81 | } | ||
82 | if(StringUtils.isNotBlank(materialIN.getAuditStatus())){ | ||
83 | queryWrapper.eq("audit_status",materialIN.getAuditStatus()); | ||
84 | } | ||
85 | if(StringUtils.isNotBlank(materialIN.getConfirmStatus())){ | ||
86 | queryWrapper.eq("confirm_status",materialIN.getConfirmStatus()); | ||
87 | } | ||
88 | if(StringUtils.isNotBlank(materialIN.getGoodCode())){ | ||
89 | queryWrapper.like("good_code",materialIN.getGoodCode()); | ||
90 | } | ||
91 | if(StringUtils.isNotBlank(materialIN.getStartTime())){ | ||
92 | queryWrapper.ge("arrive_time",materialIN.getStartTime()); | ||
93 | } | ||
94 | if(StringUtils.isNotBlank(materialIN.getEndTime())){ | ||
95 | queryWrapper.le("arrive_time",materialIN.getEndTime()); | ||
96 | } | ||
97 | |||
79 | IPage<MaterialIN> pageList = materialINService.page(page, queryWrapper); | 98 | IPage<MaterialIN> pageList = materialINService.page(page, queryWrapper); |
80 | result.setSuccess(true); | 99 | result.setSuccess(true); |
81 | result.setResult(pageList); | 100 | result.setResult(pageList); |
... | @@ -89,8 +108,26 @@ public class MaterialINController { | ... | @@ -89,8 +108,26 @@ public class MaterialINController { |
89 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | 108 | @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
90 | HttpServletRequest req) { | 109 | HttpServletRequest req) { |
91 | Result<IPage<MaterialIN>> result = new Result<IPage<MaterialIN>>(); | 110 | Result<IPage<MaterialIN>> result = new Result<IPage<MaterialIN>>(); |
92 | QueryWrapper<MaterialIN> queryWrapper = QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap()); | 111 | QueryWrapper<MaterialIN> queryWrapper = new QueryWrapper();//QueryGenerator.initQueryWrapper(materialIN, req.getParameterMap()); |
93 | Page<MaterialIN> page = new Page<MaterialIN>(pageNo, pageSize); | 112 | Page<MaterialIN> page = new Page<MaterialIN>(pageNo, pageSize); |
113 | if(StringUtils.isNotBlank(materialIN.getDepartId())){ | ||
114 | queryWrapper.eq("depart_id",materialIN.getDepartId()); | ||
115 | } | ||
116 | if(StringUtils.isNotBlank(materialIN.getAuditStatus())){ | ||
117 | queryWrapper.eq("audit_status",materialIN.getAuditStatus()); | ||
118 | } | ||
119 | if(StringUtils.isNotBlank(materialIN.getConfirmStatus())){ | ||
120 | queryWrapper.eq("confirm_status",materialIN.getConfirmStatus()); | ||
121 | } | ||
122 | if(StringUtils.isNotBlank(materialIN.getGoodCode())){ | ||
123 | queryWrapper.like("good_code",materialIN.getGoodCode()); | ||
124 | } | ||
125 | if(StringUtils.isNotBlank(materialIN.getStartTime())){ | ||
126 | queryWrapper.ge("arrive_time",materialIN.getStartTime()); | ||
127 | } | ||
128 | if(StringUtils.isNotBlank(materialIN.getEndTime())){ | ||
129 | queryWrapper.le("arrive_time",materialIN.getEndTime()); | ||
130 | } | ||
94 | IPage<MaterialIN> pageList = materialINService.page(page, queryWrapper); | 131 | IPage<MaterialIN> pageList = materialINService.page(page, queryWrapper); |
95 | result.setSuccess(true); | 132 | result.setSuccess(true); |
96 | result.setResult(pageList); | 133 | result.setResult(pageList); | ... | ... |
... | @@ -58,6 +58,7 @@ public class MaterialIN { | ... | @@ -58,6 +58,7 @@ public class MaterialIN { |
58 | /**收货人*/ | 58 | /**收货人*/ |
59 | @Excel(name = "收货人", width = 15) | 59 | @Excel(name = "收货人", width = 15) |
60 | @ApiModelProperty(value = "收货人") | 60 | @ApiModelProperty(value = "收货人") |
61 | @Dict(dictTable = "sys_user", dicCode="id", dicText = "realname") | ||
61 | private String receiver; | 62 | private String receiver; |
62 | 63 | ||
63 | @Excel(name = "物料类别", width = 15) | 64 | @Excel(name = "物料类别", width = 15) |
... | @@ -134,9 +135,12 @@ public class MaterialIN { | ... | @@ -134,9 +135,12 @@ public class MaterialIN { |
134 | /**审批状态:0 未发布 1 已发布(待审核)2 审核驳回 3 审核通过*/ | 135 | /**审批状态:0 未发布 1 已发布(待审核)2 审核驳回 3 审核通过*/ |
135 | @Excel(name = "审批状态:0 未发布 1 已发布(待审核)2 审核驳回 3 审核通过", width = 15) | 136 | @Excel(name = "审批状态:0 未发布 1 已发布(待审核)2 审核驳回 3 审核通过", width = 15) |
136 | @ApiModelProperty(value = "审批状态:0 未发布 1 已发布(待审核)2 审核驳回 3 审核通过") | 137 | @ApiModelProperty(value = "审批状态:0 未发布 1 已发布(待审核)2 审核驳回 3 审核通过") |
137 | @Dict( dicCode="purchase_plan_status") | 138 | @Dict( dicCode="audit_status") |
138 | private String auditStatus; | 139 | private String auditStatus; |
139 | 140 | ||
141 | /**审批意见*/ | ||
142 | @ApiModelProperty(value = "审批意见") | ||
143 | private String approveMessage; | ||
140 | @ApiModelProperty(value = "申请人") | 144 | @ApiModelProperty(value = "申请人") |
141 | private String applyUser; | 145 | private String applyUser; |
142 | 146 | ||
... | @@ -180,4 +184,11 @@ public class MaterialIN { | ... | @@ -180,4 +184,11 @@ public class MaterialIN { |
180 | @Excel(name = "删除标识,0:正常,1:删除", width = 15) | 184 | @Excel(name = "删除标识,0:正常,1:删除", width = 15) |
181 | @ApiModelProperty(value = "删除标识,0:正常,1:删除") | 185 | @ApiModelProperty(value = "删除标识,0:正常,1:删除") |
182 | private Integer delFlag; | 186 | private Integer delFlag; |
187 | |||
188 | @TableField(exist = false) | ||
189 | @ApiModelProperty(value = "结束时间") | ||
190 | private String endTime; | ||
191 | @TableField(exist = false) | ||
192 | @ApiModelProperty(value = "开始时间") | ||
193 | private String startTime; | ||
183 | } | 194 | } | ... | ... |
... | @@ -2,4 +2,13 @@ | ... | @@ -2,4 +2,13 @@ |
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | <mapper namespace="com.skua.modules.erp.mapper.MaterialAcceptanceFormMapper"> | 3 | <mapper namespace="com.skua.modules.erp.mapper.MaterialAcceptanceFormMapper"> |
4 | 4 | ||
5 | <select id="queryByList" resultType="com.skua.modules.erp.vo.PurchasePlanItemVO"> | ||
6 | select | ||
7 | t.arrive_time '到货日期', t.purchase_num '数量',t.measuring_unit '单位' , | ||
8 | f.appearance_info '外观情况',f.matched_info '匹配情况' ,f.handle_msg '处理意见',f.sender_sign , f.receiver_sign,f.remark , | ||
9 | t.sparepart_name,t.sparepart_code ,t.sparepart_type,t.specification ,t.depart_id , | ||
10 | from erp_material_in t | ||
11 | left join erp_material_acceptance_form f on t.id = f.id | ||
12 | where t.supplier_id = 100 and t.depart_id = 'af880d6a13404a67825e94bc0f2f3808' | ||
13 | </select> | ||
5 | </mapper> | 14 | </mapper> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -2,4 +2,10 @@ | ... | @@ -2,4 +2,10 @@ |
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | <mapper namespace="com.skua.modules.erp.mapper.MaterialINMapper"> | 3 | <mapper namespace="com.skua.modules.erp.mapper.MaterialINMapper"> |
4 | 4 | ||
5 | <!--查询 入库单 --> | ||
6 | <select id="queryByList" resultType="com.skua.modules.erp.entity.MaterialIN"> | ||
7 | select t.* | ||
8 | from erp_material_in t | ||
9 | where t.supplier_id = 100 and t.depart_id = 'af880d6a13404a67825e94bc0f2f3808' | ||
10 | </select> | ||
5 | </mapper> | 11 | </mapper> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -120,7 +120,7 @@ public class DistributContractServiceImpl extends ServiceImpl<DistributContractM | ... | @@ -120,7 +120,7 @@ public class DistributContractServiceImpl extends ServiceImpl<DistributContractM |
120 | distributContractVO.setStatus( "3" ); | 120 | distributContractVO.setStatus( "3" ); |
121 | } | 121 | } |
122 | if("2".equals( distributContractVO.getApproveState() )){ | 122 | if("2".equals( distributContractVO.getApproveState() )){ |
123 | distributContractVO.setStatus( "4" ); | 123 | distributContractVO.setStatus( "2" ); |
124 | } | 124 | } |
125 | 125 | ||
126 | this.baseMapper.updateById( distributContractVO ) ; | 126 | this.baseMapper.updateById( distributContractVO ) ; | ... | ... |
... | @@ -32,7 +32,7 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia | ... | @@ -32,7 +32,7 @@ public class MaterialINServiceImpl extends ServiceImpl<MaterialINMapper, Materia |
32 | materialINVO.setAuditStatus( "3" ); | 32 | materialINVO.setAuditStatus( "3" ); |
33 | } | 33 | } |
34 | if("2".equals( materialINVO.getApproveState() )){ | 34 | if("2".equals( materialINVO.getApproveState() )){ |
35 | materialINVO.setAuditStatus( "4" ); | 35 | materialINVO.setAuditStatus( "2" ); |
36 | } | 36 | } |
37 | this.baseMapper.updateById( materialINVO ) ; | 37 | this.baseMapper.updateById( materialINVO ) ; |
38 | 38 | ... | ... |
... | @@ -127,7 +127,7 @@ public class PurchasePlanServiceImpl extends ServiceImpl<PurchasePlanMapper, Pur | ... | @@ -127,7 +127,7 @@ public class PurchasePlanServiceImpl extends ServiceImpl<PurchasePlanMapper, Pur |
127 | purchasePlanVO.setStatus( "3" ); | 127 | purchasePlanVO.setStatus( "3" ); |
128 | } | 128 | } |
129 | if("2".equals( purchasePlanVO.getApproveState() )){ | 129 | if("2".equals( purchasePlanVO.getApproveState() )){ |
130 | purchasePlanVO.setStatus( "4" ); | 130 | purchasePlanVO.setStatus( "2" ); |
131 | //发送入库单据,物料库存增加 | 131 | //发送入库单据,物料库存增加 |
132 | warehousing = true; | 132 | warehousing = true; |
133 | } | 133 | } | ... | ... |
... | @@ -14,10 +14,7 @@ import lombok.experimental.Accessors; | ... | @@ -14,10 +14,7 @@ import lombok.experimental.Accessors; |
14 | @ApiModel(value="MaterialINVO查询对象", description="MaterialINVO查询对象") | 14 | @ApiModel(value="MaterialINVO查询对象", description="MaterialINVO查询对象") |
15 | public class MaterialINVO extends MaterialIN { | 15 | public class MaterialINVO extends MaterialIN { |
16 | 16 | ||
17 | /**审批意见*/ | 17 | |
18 | @TableField(exist=false) | ||
19 | @ApiModelProperty(value = "审批意见") | ||
20 | private String approveMessage; | ||
21 | /**审批状态*/ | 18 | /**审批状态*/ |
22 | @TableField(exist=false) | 19 | @TableField(exist=false) |
23 | @ApiModelProperty(value = "审批状态 1通过2不通过") | 20 | @ApiModelProperty(value = "审批状态 1通过2不通过") | ... | ... |
-
请 注册 或 登录 后发表评论