dad7c4d6 康伟

kangwei :采购计划的选择物料,去年数据使用计划表单的计划年参数

1 个父辈 4d6c01ca
...@@ -8,6 +8,7 @@ import com.skua.core.aspect.annotation.AutoLog; ...@@ -8,6 +8,7 @@ import com.skua.core.aspect.annotation.AutoLog;
8 import com.skua.core.context.BaseContextHandler; 8 import com.skua.core.context.BaseContextHandler;
9 import com.skua.core.query.QueryGenerator; 9 import com.skua.core.query.QueryGenerator;
10 import com.skua.core.util.ConvertUtils; 10 import com.skua.core.util.ConvertUtils;
11 import com.skua.core.util.DateUtils;
11 import com.skua.modules.equipment.service.IEquipmentSparepartService; 12 import com.skua.modules.equipment.service.IEquipmentSparepartService;
12 import com.skua.modules.erp.entity.ApproveRecord; 13 import com.skua.modules.erp.entity.ApproveRecord;
13 import com.skua.modules.erp.entity.PurchaseMaterial; 14 import com.skua.modules.erp.entity.PurchaseMaterial;
...@@ -15,6 +16,7 @@ import com.skua.modules.erp.service.IDistributMaterialService; ...@@ -15,6 +16,7 @@ import com.skua.modules.erp.service.IDistributMaterialService;
15 import com.skua.modules.erp.service.IPurchaseMaterialService; 16 import com.skua.modules.erp.service.IPurchaseMaterialService;
16 import com.skua.modules.erp.vo.MaterialSearchVO; 17 import com.skua.modules.erp.vo.MaterialSearchVO;
17 import com.skua.modules.erp.vo.PurchaseMaterialVO; 18 import com.skua.modules.erp.vo.PurchaseMaterialVO;
19 import com.skua.modules.guest.util.DateUtil;
18 import com.skua.modules.quartz.util.BaseUtil; 20 import com.skua.modules.quartz.util.BaseUtil;
19 import com.skua.modules.supplies.entity.EquipmentSparepartSupplies; 21 import com.skua.modules.supplies.entity.EquipmentSparepartSupplies;
20 import com.skua.modules.supplies.entity.EquipmentSparepartType; 22 import com.skua.modules.supplies.entity.EquipmentSparepartType;
...@@ -64,9 +66,13 @@ public class ErpCommonController { ...@@ -64,9 +66,13 @@ public class ErpCommonController {
64 sparepartTypeStr = String.join(",", sparepartTypeSet); 66 sparepartTypeStr = String.join(",", sparepartTypeSet);
65 } 67 }
66 } 68 }
69 Integer applyYear = DateUtils.getYear() -1;
70 if(materialSearchVO.getApplyYear() != null ){
71 applyYear =materialSearchVO.getApplyYear() -1;
72 }
67 // String depId = BaseContextHandler.getRealDepartId();//临时参数 73 // String depId = BaseContextHandler.getRealDepartId();//临时参数
68 // String username = req.getParameter("username"); 74 // String username = req.getParameter("username");
69 IPage<EquipmentSparepartSupplies> pageList = sparepartSuppliesService.queryPageByOut(page , materialSearchVO.getSparepartName() ,sparepartTypeStr ,materialSearchVO.getSparepartCode()); 75 IPage<EquipmentSparepartSupplies> pageList = sparepartSuppliesService.queryPageByOut(page , materialSearchVO.getSparepartName() ,sparepartTypeStr ,materialSearchVO.getSparepartCode(),applyYear);
70 result.setSuccess(true); 76 result.setSuccess(true);
71 result.setResult(pageList); 77 result.setResult(pageList);
72 return result; 78 return result;
......
...@@ -19,6 +19,9 @@ public class MaterialSearchVO { ...@@ -19,6 +19,9 @@ public class MaterialSearchVO {
19 @ApiModelProperty(value = "分销合同编号") 19 @ApiModelProperty(value = "分销合同编号")
20 private String distributContractId; 20 private String distributContractId;
21 21
22 @ApiModelProperty(value = "计划年份")
23 private Integer applyYear;
24
22 @ApiModelProperty(value = "物料编号") 25 @ApiModelProperty(value = "物料编号")
23 private String sparepartCode; 26 private String sparepartCode;
24 27
......
...@@ -19,5 +19,5 @@ public interface EquipmentSparepartSuppliesMapper extends BaseMapper<EquipmentSp ...@@ -19,5 +19,5 @@ public interface EquipmentSparepartSuppliesMapper extends BaseMapper<EquipmentSp
19 * @return 19 * @return
20 */ 20 */
21 public IPage<EquipmentSparepartSupplies> selectPageByOut(Page<EquipmentSparepartSupplies> page,@Param("sparepartName")String sparepartName, 21 public IPage<EquipmentSparepartSupplies> selectPageByOut(Page<EquipmentSparepartSupplies> page,@Param("sparepartName")String sparepartName,
22 @Param("sparepartType")String sparepartType ,@Param("sparepartCode")String sparepartCode); 22 @Param("sparepartType")String sparepartType ,@Param("sparepartCode")String sparepartCode, @Param("applyYear")Integer applyYear);
23 } 23 }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
9 left join ( 9 left join (
10 select sum(out_num) out_num ,sparepart_id from equipment_out_child 10 select sum(out_num) out_num ,sparepart_id from equipment_out_child
11 where 11 where
12 YEAR(create_time) = YEAR(CURRENT_DATE - INTERVAL 1 YEAR) 12 YEAR(create_time) = #{applyYear}
13 group by sparepart_id 13 group by sparepart_id
14 ) aaa on aaa.sparepart_id = ss.id 14 ) aaa on aaa.sparepart_id = ss.id
15 <where> 15 <where>
......
...@@ -15,5 +15,5 @@ public interface IEquipmentSparepartSuppliesService extends IService<EquipmentSp ...@@ -15,5 +15,5 @@ public interface IEquipmentSparepartSuppliesService extends IService<EquipmentSp
15 * @param depId 15 * @param depId
16 * @return 16 * @return
17 */ 17 */
18 public IPage<EquipmentSparepartSupplies> queryPageByOut(Page<EquipmentSparepartSupplies> page, String sparepartName,String sparepartType ,String sparepartCode); 18 public IPage<EquipmentSparepartSupplies> queryPageByOut(Page<EquipmentSparepartSupplies> page, String sparepartName,String sparepartType ,String sparepartCode ,Integer applyYear);
19 } 19 }
......
...@@ -20,7 +20,7 @@ public class EquipmentSparepartSuppliesServiceImpl extends ServiceImpl<Equipment ...@@ -20,7 +20,7 @@ public class EquipmentSparepartSuppliesServiceImpl extends ServiceImpl<Equipment
20 * @param 20 * @param
21 * @return 21 * @return
22 */ 22 */
23 public IPage<EquipmentSparepartSupplies> queryPageByOut(Page<EquipmentSparepartSupplies> page ,String sparepartName,String sparepartType ,String sparepartCode){ 23 public IPage<EquipmentSparepartSupplies> queryPageByOut(Page<EquipmentSparepartSupplies> page ,String sparepartName,String sparepartType ,String sparepartCode,Integer applyYear){
24 return baseMapper.selectPageByOut(page ,sparepartName,sparepartType,sparepartCode); 24 return baseMapper.selectPageByOut(page ,sparepartName,sparepartType,sparepartCode,applyYear);
25 } 25 }
26 } 26 }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!