|
@@ -0,0 +1,250 @@
|
|
|
+package org.jeecg.modules.report.controller;
|
|
|
+
|
|
|
+
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.jeecg.common.api.vo.Result;
|
|
|
+import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
+import org.jeecg.common.system.api.ISysBaseAPI;
|
|
|
+import org.jeecg.common.util.oConvertUtils;
|
|
|
+import org.jeecg.modules.base.service.BaseCommonService;
|
|
|
+import org.jeecg.modules.report.entity.*;
|
|
|
+import org.jeecg.modules.report.service.IFabricLossService;
|
|
|
+import org.jeecg.modules.report.service.IFabricOmOrderService;
|
|
|
+import org.jeecg.modules.report.service.IFabricPoOrderService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import java.util.Collection;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * 用户表 前端控制器
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @Author scott
|
|
|
+ * @since 2018-12-20
|
|
|
+ */
|
|
|
+@Slf4j
|
|
|
+@RestController
|
|
|
+@RequestMapping("/report/FabricLoss")
|
|
|
+@Api(tags = "面料损耗")
|
|
|
+public class FabricLossController {
|
|
|
+ @Autowired
|
|
|
+ private ISysBaseAPI sysBaseAPI;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IFabricPoOrderService fabricPoOrderService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private BaseCommonService baseCommonService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IFabricLossService fabricLossService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IFabricOmOrderService fabricOmOrderService;
|
|
|
+ /**
|
|
|
+ *面料损耗
|
|
|
+ * @param csocode 计划号
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @AutoLog(value = "面料损耗整体数据")
|
|
|
+ @ApiOperation(value = "面料损耗整体数据")
|
|
|
+ @ApiImplicitParams(value={
|
|
|
+ @ApiImplicitParam(name="csocode",value="计划号",required = true)
|
|
|
+ })
|
|
|
+ @RequestMapping(value = "/getFabricLossDatas", method = RequestMethod.GET)
|
|
|
+ public Result<Map<String,Object>> getFabricLossDatas(String csocode) {
|
|
|
+ Result<Map<String,Object>> result = new Result<>();
|
|
|
+ if (oConvertUtils.isNotEmpty(csocode)){
|
|
|
+ Map<String,Object> fabricLossDatas = fabricLossService.getFabricLossDatas(csocode);
|
|
|
+ result.setSuccess(true);
|
|
|
+ result.setResult(fabricLossDatas);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 面料损耗-采购订单-采购数量
|
|
|
+ * @param code
|
|
|
+ * @param cinvcode
|
|
|
+ * @param cBatch
|
|
|
+ * @param ioritaxcost
|
|
|
+ * @param cfree1
|
|
|
+ * @param cfree2
|
|
|
+ * @param cfree3
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @AutoLog(value = "面料损耗-采购订单-采购数量")
|
|
|
+ @ApiOperation(value = "面料损耗-采购订单-采购数量")
|
|
|
+ @ApiImplicitParams(value={
|
|
|
+ @ApiImplicitParam(name="code",value="计划号",required = true),@ApiImplicitParam(name="cinvcode",value="存货编码",required = true),
|
|
|
+ @ApiImplicitParam(name="cBatch",value="批号",required = true),@ApiImplicitParam(name="ioritaxcost",value="单价"),
|
|
|
+ @ApiImplicitParam(name="cfree1",value="存货自定义项1"),@ApiImplicitParam(name="cfree2",value="存货自定义项2"),@ApiImplicitParam(name="cfree3",value="存货自定义项3")
|
|
|
+ })
|
|
|
+ @RequestMapping(value = "/getFabricPoOrderSum", method = RequestMethod.GET)
|
|
|
+ public Result<Collection<PoOrderSum>> getFabricPoOrderSum( String code, String cinvcode, String cBatch, String ioritaxcost, String cfree1, String cfree2, String cfree3) {
|
|
|
+ Result<Collection<PoOrderSum>> result = new Result<>();
|
|
|
+ if (oConvertUtils.isNotEmpty(code)&&oConvertUtils.isNotEmpty(cinvcode)&&oConvertUtils.isNotEmpty(cBatch)){
|
|
|
+ List<PoOrderSum> fabricPoOrderSum = fabricPoOrderService.getFabricPoOrderSum(code,null, cinvcode, cBatch, ioritaxcost, cfree1, cfree2, cfree3);
|
|
|
+ result.setSuccess(true);
|
|
|
+ result.setResult(fabricPoOrderSum);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ *面料损耗-采购订单-余纱数据(有批号)
|
|
|
+ * @param csocode 计划号
|
|
|
+ * @param csoordercode 源计划号
|
|
|
+ * @param cinvcode 物料编码
|
|
|
+ * @param cBatch 批号
|
|
|
+ * @param comcode 委外订单号
|
|
|
+ * @param cfree1 存货自定义项
|
|
|
+ * @param cfree2 存货自定义项
|
|
|
+ * @param cfree3 存货自定义项
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @AutoLog(value = "面料损耗-采购订单-余纱数据(有批号)")
|
|
|
+ @ApiOperation(value = "面料损耗-采购订单-余纱数据(有批号)")
|
|
|
+ @ApiImplicitParams(value={
|
|
|
+ @ApiImplicitParam(name="csoordercode",value="源计划号",required = true),@ApiImplicitParam(name="cinvcode",value="存货编码",required = true),
|
|
|
+ @ApiImplicitParam(name="cBatch",value="批号",required = true),@ApiImplicitParam(name="csocode",value="计划号"),@ApiImplicitParam(name="comcode",value="委外订单号"),
|
|
|
+ @ApiImplicitParam(name="cfree1",value="存货自定义项1"),@ApiImplicitParam(name="cfree2",value="存货自定义项2"),@ApiImplicitParam(name="cfree3",value="存货自定义项3")
|
|
|
+ })
|
|
|
+ @RequestMapping(value = "/getFabricPoOrderYS", method = RequestMethod.GET)
|
|
|
+ public Result<Collection<FabricYarn>> getFabricPoOrderYS(String csocode, String csoordercode, String cinvcode,String cBatch,String comcode,String cfree1,String cfree2,String cfree3) {
|
|
|
+ Result<Collection<FabricYarn>> result = new Result<>();
|
|
|
+ if (oConvertUtils.isNotEmpty(csoordercode)&&oConvertUtils.isNotEmpty(cinvcode)&&oConvertUtils.isNotEmpty(cBatch)){
|
|
|
+ List<FabricYarn> fabricPoOrderYS = fabricPoOrderService.getFabricPoOrderYS(csocode, csoordercode, cinvcode, cBatch, comcode, cfree1, cfree2, cfree3);
|
|
|
+ result.setSuccess(true);
|
|
|
+ result.setResult(fabricPoOrderYS);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ *面料损耗-采购订单-其他入库纱-集合数据
|
|
|
+ * @param csocode 计划号
|
|
|
+ * @param cBatch 批号
|
|
|
+ * @param comcode 委外订单号
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @AutoLog(value = "面料损耗-采购订单-其他入库纱-超链接")
|
|
|
+ @ApiOperation(value = "面料损耗-采购订单-其他入库纱-超链接")
|
|
|
+ @ApiImplicitParams(value={
|
|
|
+ @ApiImplicitParam(name="cBatch",value="批号",required = true),@ApiImplicitParam(name="csocode",value="计划号",required = true),@ApiImplicitParam(name="comcode",value="委外订单号")
|
|
|
+ })
|
|
|
+ @RequestMapping(value = "/getFabricGetPoOrderQTData", method = RequestMethod.GET)
|
|
|
+ public Result<Collection<FabricYarn>> getFabricGetPoOrderQTData(String csocode,String cBatch,String comcode) {
|
|
|
+ Result<Collection<FabricYarn>> result = new Result<>();
|
|
|
+ if (oConvertUtils.isNotEmpty(csocode)&&oConvertUtils.isNotEmpty(cBatch)){
|
|
|
+ List<FabricYarn> fabricGetPoOrderQTData = fabricPoOrderService.getFabricGetPoOrderQTData(csocode, cBatch, comcode);
|
|
|
+ result.setSuccess(true);
|
|
|
+ result.setResult(fabricGetPoOrderQTData);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ *面料损耗-采购订单-来源余纱-集合数据
|
|
|
+ * @param csocode 计划号
|
|
|
+ * @param cBatch 过滤批号
|
|
|
+ * @param cBatchs 条件批号
|
|
|
+ * @param price 价格
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @AutoLog(value = "面料损耗-采购订单-来源余纱-超链接")
|
|
|
+ @ApiOperation(value = "面料损耗-采购订单-来源余纱-超链接")
|
|
|
+ @ApiImplicitParams(value={
|
|
|
+ @ApiImplicitParam(name="cBatch",value="源批号",required = true),@ApiImplicitParam(name="csocode",value="计划号",required = true),@ApiImplicitParam(name="cBatchs",value="批号")
|
|
|
+ ,@ApiImplicitParam(name="price",value="价格")
|
|
|
+ })
|
|
|
+ @RequestMapping(value = "/getFabricGetPoOrderYsData", method = RequestMethod.GET)
|
|
|
+ public Result<Collection<FabricYarn>> getFabricGetPoOrderYsData(String csocode,String cBatch,String cBatchs,String price) {
|
|
|
+ Result<Collection<FabricYarn>> result = new Result<>();
|
|
|
+ if (oConvertUtils.isNotEmpty(csocode)&&oConvertUtils.isNotEmpty(cBatch)){
|
|
|
+ List<FabricYarn> fabricGetPoOrderYsData = fabricPoOrderService.getFabricGetPoOrderYsData(csocode, cBatch, cBatchs, price);
|
|
|
+ result.setSuccess(true);
|
|
|
+ result.setResult(fabricGetPoOrderYsData);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ *面料损耗-委外订单-出库数量-超链接
|
|
|
+ * @param iOMoDID 子表id
|
|
|
+ * @param cInvCode 物料编码
|
|
|
+ * @param cInvName 物料名称
|
|
|
+ * @param cbatch 批号
|
|
|
+ * @param cVenAbbName 供应商
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @AutoLog(value = "面料损耗-委外订单-出库数量-超链接")
|
|
|
+ @ApiOperation(value = "面料损耗-委外订单-出库数量-超链接")
|
|
|
+ @ApiImplicitParams(value={
|
|
|
+ @ApiImplicitParam(name="iOMoDID",value="委外子表id",required = true),@ApiImplicitParam(name="cInvCode",value="物料编码"),@ApiImplicitParam(name="cbatch",value="批号")
|
|
|
+ ,@ApiImplicitParam(name="cVenAbbName",value="供应商")
|
|
|
+ })
|
|
|
+ @RequestMapping(value = "/getFabricOMOrderDataCK", method = RequestMethod.GET)
|
|
|
+ public Result<Collection<FabricMoOrderCK>> getFabricOMOrderDataCK(String iOMoDID,String cInvCode,String cInvName,String cbatch,String cVenAbbName) {
|
|
|
+ Result<Collection<FabricMoOrderCK>> result = new Result<>();
|
|
|
+ if (oConvertUtils.isNotEmpty(iOMoDID)){
|
|
|
+ List<FabricMoOrderCK> fabricOMOrderDataCK = fabricOmOrderService.getFabricOMOrderDataCK(iOMoDID, cInvCode, cInvName, cbatch, cVenAbbName);
|
|
|
+ result.setSuccess(true);
|
|
|
+ result.setResult(fabricOMOrderDataCK);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @AutoLog(value = "面料损耗-委外订单-入库数量-入库明细")
|
|
|
+ @ApiOperation(value = "面料损耗-委外订单-入库数量-入库明细")
|
|
|
+ @ApiImplicitParams(value={
|
|
|
+ @ApiImplicitParam(name="iOMoDID",value="委外子表id",required = true)
|
|
|
+ ,@ApiImplicitParam(name="cordercode",value="委外订单号")
|
|
|
+ })
|
|
|
+ @RequestMapping(value = "/getFabricOMOrderDataRK", method = RequestMethod.GET)
|
|
|
+ public Result<Collection<FabricMoOrderRK>> getFabricOMOrderDataRK(String iOMoDID, String cordercode) {
|
|
|
+ Result<Collection<FabricMoOrderRK>> result = new Result<>();
|
|
|
+ if (oConvertUtils.isNotEmpty(iOMoDID)){
|
|
|
+ List<FabricMoOrderRK> fabricOMOrderDataRK = fabricOmOrderService.getFabricOMOrderDataRK(iOMoDID, cordercode);
|
|
|
+ result.setSuccess(true);
|
|
|
+ result.setResult(fabricOMOrderDataRK);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @AutoLog(value = "面料损耗-委外订单-入库数量-使用明细")
|
|
|
+ @ApiOperation(value = "面料损耗-委外订单-入库数量-使用明细")
|
|
|
+ @ApiImplicitParams(value={
|
|
|
+ @ApiImplicitParam(name="iOMoDID",value="委外子表id",required = true)
|
|
|
+ ,@ApiImplicitParam(name="comcode",value="下游委外订单号")
|
|
|
+ })
|
|
|
+ @RequestMapping(value = "/getFabricOMOrderDataRK2", method = RequestMethod.GET)
|
|
|
+ public Result<Collection<FabricMoOrderRK>> getFabricOMOrderDataRK2(String iOMoDID, String comcode) {
|
|
|
+ Result<Collection<FabricMoOrderRK>> result = new Result<>();
|
|
|
+ if (oConvertUtils.isNotEmpty(iOMoDID)){
|
|
|
+ List<FabricMoOrderRK> fabricOMOrderDataRK2 = fabricOmOrderService.getFabricOMOrderDataRK2(iOMoDID, comcode);
|
|
|
+ result.setSuccess(true);
|
|
|
+ result.setResult(fabricOMOrderDataRK2);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+}
|