|  | @@ -12,6 +12,8 @@ import javax.servlet.http.HttpServletRequest;
 | 
	
		
			
				|  |  |  import javax.servlet.http.HttpServletResponse;
 | 
	
		
			
				|  |  |  import org.jeecg.common.system.vo.LoginUser;
 | 
	
		
			
				|  |  |  import org.apache.shiro.SecurityUtils;
 | 
	
		
			
				|  |  | +import org.jeecg.common.util.oConvertUtils;
 | 
	
		
			
				|  |  | +import org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo;
 | 
	
		
			
				|  |  |  import org.jeecgframework.poi.excel.ExcelImportUtil;
 | 
	
		
			
				|  |  |  import org.jeecgframework.poi.excel.def.NormalExcelConstants;
 | 
	
		
			
				|  |  |  import org.jeecgframework.poi.excel.entity.ExportParams;
 | 
	
	
		
			
				|  | @@ -20,7 +22,6 @@ import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import org.jeecg.common.api.vo.Result;
 | 
	
		
			
				|  |  |  import org.jeecg.common.system.query.QueryGenerator;
 | 
	
		
			
				|  |  | -import org.jeecg.common.util.oConvertUtils;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.splfi.entity.SyPackingListFabricItem;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.splfi.entity.SyPackingListFabric;
 | 
	
		
			
				|  |  |  import org.jeecg.modules.splfi.vo.SyPackingListFabricPage;
 | 
	
	
		
			
				|  | @@ -42,12 +43,12 @@ import io.swagger.annotations.ApiOperation;
 | 
	
		
			
				|  |  |  import org.jeecg.common.aspect.annotation.AutoLog;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |   /**
 | 
	
		
			
				|  |  | - * @Description: 面料装箱单
 | 
	
		
			
				|  |  | + * @Description: 装箱单面料
 | 
	
		
			
				|  |  |   * @Author: jeecg-boot
 | 
	
		
			
				|  |  |   * @Date:   2022-07-27
 | 
	
		
			
				|  |  |   * @Version: V1.0
 | 
	
		
			
				|  |  |   */
 | 
	
		
			
				|  |  | -@Api(tags="面料装箱单")
 | 
	
		
			
				|  |  | +@Api(tags="装箱单面料")
 | 
	
		
			
				|  |  |  @RestController
 | 
	
		
			
				|  |  |  @RequestMapping("/splfi/syPackingListFabric")
 | 
	
		
			
				|  |  |  @Slf4j
 | 
	
	
		
			
				|  | @@ -66,49 +67,116 @@ public class SyPackingListFabricController {
 | 
	
		
			
				|  |  |  	 * @param req
 | 
	
		
			
				|  |  |  	 * @return
 | 
	
		
			
				|  |  |  	 */
 | 
	
		
			
				|  |  | -	@AutoLog(value = "面料装箱单-分页列表查询")
 | 
	
		
			
				|  |  | -	@ApiOperation(value="面料装箱单-分页列表查询", notes="面料装箱单-分页列表查询")
 | 
	
		
			
				|  |  | +	@AutoLog(value = "装箱单面料-分页列表查询")
 | 
	
		
			
				|  |  | +	@ApiOperation(value="装箱单面料-分页列表查询", notes="装箱单面料-分页列表查询")
 | 
	
		
			
				|  |  |  	@GetMapping(value = "/list")
 | 
	
		
			
				|  |  | -	public Result<?> queryPageList(SyPackingListFabric syPackingListFabric,
 | 
	
		
			
				|  |  | +	public Result<IPage<SyPackingListFabric>> queryPageList(SyPackingListFabric syPackingListFabric,
 | 
	
		
			
				|  |  |  								   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
 | 
	
		
			
				|  |  |  								   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
 | 
	
		
			
				|  |  |  								   HttpServletRequest req) {
 | 
	
		
			
				|  |  | +		Result<IPage<SyPackingListFabric>> result= new Result();
 | 
	
		
			
				|  |  |  		QueryWrapper<SyPackingListFabric> queryWrapper = QueryGenerator.initQueryWrapper(syPackingListFabric, req.getParameterMap());
 | 
	
		
			
				|  |  |  		Page<SyPackingListFabric> page = new Page<SyPackingListFabric>(pageNo, pageSize);
 | 
	
		
			
				|  |  |  		IPage<SyPackingListFabric> pageList = syPackingListFabricService.page(page, queryWrapper);
 | 
	
		
			
				|  |  | -		return Result.OK(pageList);
 | 
	
		
			
				|  |  | +		return result.OK(pageList);
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  | -	
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	 @AutoLog(value = "参照发运明细")
 | 
	
		
			
				|  |  | +	 @ApiOperation(value="参照发运明细", notes="参照发运明细")
 | 
	
		
			
				|  |  | +	 @GetMapping(value = "/getShippingDetails")
 | 
	
		
			
				|  |  | +	 public Result<IPage<SyShippingDetailsVo>> getShippingDetails(
 | 
	
		
			
				|  |  | +			 @RequestParam(name="documentNo",required = false) String documentNo,
 | 
	
		
			
				|  |  | +			 @RequestParam(name="chineseName",required = false) String chineseName,
 | 
	
		
			
				|  |  | +			 @RequestParam(name="status", defaultValue="y") String status,
 | 
	
		
			
				|  |  | +			 @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
 | 
	
		
			
				|  |  | +			 @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
 | 
	
		
			
				|  |  | +			 HttpServletRequest req) {
 | 
	
		
			
				|  |  | +		 //只有成衣才能被选中,筛选为成衣的订单,需要加个条件
 | 
	
		
			
				|  |  | +		 Result<IPage<SyShippingDetailsVo>> result = new Result<IPage<SyShippingDetailsVo>>();
 | 
	
		
			
				|  |  | +		 QueryWrapper<SyShippingDetailsVo> queryWrapper = new QueryWrapper<>();
 | 
	
		
			
				|  |  | +		 if(oConvertUtils.isNotEmpty(documentNo)) {
 | 
	
		
			
				|  |  | +			 queryWrapper.eq("t.documentNo", documentNo);//单据号
 | 
	
		
			
				|  |  | +		 }
 | 
	
		
			
				|  |  | +		 if(oConvertUtils.isNotEmpty(chineseName)){
 | 
	
		
			
				|  |  | +			 queryWrapper.eq("t.chineseName",chineseName);//品名
 | 
	
		
			
				|  |  | +		 }
 | 
	
		
			
				|  |  | +/*		 if(oConvertUtils.isNotEmpty(status)){//选择正常或者超发状态
 | 
	
		
			
				|  |  | +			 if(status.equals("n")){
 | 
	
		
			
				|  |  | +				 queryWrapper.ge("t.excess_quantity",0);//大于等于--超发
 | 
	
		
			
				|  |  | +			 }else{
 | 
	
		
			
				|  |  | +				 queryWrapper.le("t.excess_quantity",-1);//小于等于--正常
 | 
	
		
			
				|  |  | +			 }
 | 
	
		
			
				|  |  | +		 }*/
 | 
	
		
			
				|  |  | +		 Page<SyShippingDetailsVo> page = new Page<SyShippingDetailsVo>(pageNo, pageSize);
 | 
	
		
			
				|  |  | +		 IPage<SyShippingDetailsVo> pageList = syPackingListFabricService.queryShippingDetails(page, queryWrapper);
 | 
	
		
			
				|  |  | +		 result.setSuccess(true);
 | 
	
		
			
				|  |  | +		 result.setResult(pageList);
 | 
	
		
			
				|  |  | +		 result.setMessage("查询成功");
 | 
	
		
			
				|  |  | +		 return result;
 | 
	
		
			
				|  |  | +	 }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	 @AutoLog(value = "提供发运明细id获取数据")
 | 
	
		
			
				|  |  | +	 @ApiOperation(value="提供发运明细id获取数据", notes="提供发运明细id获取数据")
 | 
	
		
			
				|  |  | +	 @GetMapping(value = "/getShippingDetailId")
 | 
	
		
			
				|  |  | +	 public Result<SyPackingListFabric>  getSyShippingDetailsData(String id){
 | 
	
		
			
				|  |  | +		Result<SyPackingListFabric> result=new Result<>();
 | 
	
		
			
				|  |  | +		if(oConvertUtils.isEmpty(id)){
 | 
	
		
			
				|  |  | +			result.setMessage("id不能为空");
 | 
	
		
			
				|  |  | +			result.setSuccess(false);
 | 
	
		
			
				|  |  | +			return result;
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		result.setResult(syPackingListFabricService.getSyShippingDetailsData(id));
 | 
	
		
			
				|  |  | +		result.setSuccess(true);
 | 
	
		
			
				|  |  | +		result.setMessage("成功");
 | 
	
		
			
				|  |  | +		return result;
 | 
	
		
			
				|  |  | +	 }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  	/**
 | 
	
		
			
				|  |  |  	 * 添加
 | 
	
		
			
				|  |  |  	 *
 | 
	
		
			
				|  |  | -	 * @param syPackingListFabricPage
 | 
	
		
			
				|  |  | +	 * @param syPackingListFabric
 | 
	
		
			
				|  |  |  	 * @return
 | 
	
		
			
				|  |  |  	 */
 | 
	
		
			
				|  |  | -	@AutoLog(value = "面料装箱单-添加")
 | 
	
		
			
				|  |  | -	@ApiOperation(value="面料装箱单-添加", notes="面料装箱单-添加")
 | 
	
		
			
				|  |  | +	@AutoLog(value = "装箱单面料-添加")
 | 
	
		
			
				|  |  | +	@ApiOperation(value="装箱单面料-添加", notes="装箱单面料-添加")
 | 
	
		
			
				|  |  |  	@PostMapping(value = "/add")
 | 
	
		
			
				|  |  | -	public Result<?> add(@RequestBody SyPackingListFabricPage syPackingListFabricPage) {
 | 
	
		
			
				|  |  | -		SyPackingListFabric syPackingListFabric = new SyPackingListFabric();
 | 
	
		
			
				|  |  | -		BeanUtils.copyProperties(syPackingListFabricPage, syPackingListFabric);
 | 
	
		
			
				|  |  | -		syPackingListFabricService.saveMain(syPackingListFabric, syPackingListFabricPage.getSyPackingListFabricItemList());
 | 
	
		
			
				|  |  | -		return Result.OK("添加成功!");
 | 
	
		
			
				|  |  | +	public Result<SyPackingListFabric> add(@RequestBody SyPackingListFabric syPackingListFabric) {
 | 
	
		
			
				|  |  | +		Result<SyPackingListFabric> result=new Result<>();
 | 
	
		
			
				|  |  | +		if(oConvertUtils.isEmpty(syPackingListFabric)){
 | 
	
		
			
				|  |  | +			result.setSuccess(false);
 | 
	
		
			
				|  |  | +			result.setMessage("请填写信息再提交");
 | 
	
		
			
				|  |  | +			result.setResult(null);
 | 
	
		
			
				|  |  | +			return result;
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		syPackingListFabricService.saveMain(syPackingListFabric, syPackingListFabric.getSyPackingListFabricItem());
 | 
	
		
			
				|  |  | +		result.setSuccess(true);
 | 
	
		
			
				|  |  | +		result.setMessage("添加成功");
 | 
	
		
			
				|  |  | +		result.setResult(syPackingListFabric);
 | 
	
		
			
				|  |  | +		return result;
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  	
 | 
	
		
			
				|  |  |  	/**
 | 
	
		
			
				|  |  |  	 * 编辑
 | 
	
		
			
				|  |  |  	 *
 | 
	
		
			
				|  |  | -	 * @param syPackingListFabricPage
 | 
	
		
			
				|  |  | +	 * @param syPackingListFabric
 | 
	
		
			
				|  |  |  	 * @return
 | 
	
		
			
				|  |  |  	 */
 | 
	
		
			
				|  |  | -	@AutoLog(value = "面料装箱单-编辑")
 | 
	
		
			
				|  |  | -	@ApiOperation(value="面料装箱单-编辑", notes="面料装箱单-编辑")
 | 
	
		
			
				|  |  | +	@AutoLog(value = "装箱单面料-编辑")
 | 
	
		
			
				|  |  | +	@ApiOperation(value="装箱单面料-编辑", notes="装箱单面料-编辑")
 | 
	
		
			
				|  |  |  	@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
 | 
	
		
			
				|  |  | -	public Result<?> edit(@RequestBody SyPackingListFabricPage syPackingListFabricPage) {
 | 
	
		
			
				|  |  | -		SyPackingListFabric syPackingListFabric = new SyPackingListFabric();
 | 
	
		
			
				|  |  | -		BeanUtils.copyProperties(syPackingListFabricPage, syPackingListFabric);
 | 
	
		
			
				|  |  | -		syPackingListFabricService.updateMain(syPackingListFabric, syPackingListFabricPage.getSyPackingListFabricItemList());
 | 
	
		
			
				|  |  | -		return Result.OK("编辑成功!");
 | 
	
		
			
				|  |  | +	public Result<?> edit(@RequestBody SyPackingListFabric syPackingListFabric) {
 | 
	
		
			
				|  |  | +		Result<SyPackingListFabric> result=new Result<>();
 | 
	
		
			
				|  |  | +		if (oConvertUtils.isEmpty(syPackingListFabric)){
 | 
	
		
			
				|  |  | +			result.setSuccess(false);
 | 
	
		
			
				|  |  | +			result.setMessage("请填写信息再提交");
 | 
	
		
			
				|  |  | +			result.setResult(null);
 | 
	
		
			
				|  |  | +			return result;
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		syPackingListFabricService.updateMain(syPackingListFabric, syPackingListFabric.getSyPackingListFabricItem());
 | 
	
		
			
				|  |  | +		result.setSuccess(true);
 | 
	
		
			
				|  |  | +		result.setMessage("编辑成功");
 | 
	
		
			
				|  |  | +		result.setResult(syPackingListFabric);
 | 
	
		
			
				|  |  | +		return result;
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  	
 | 
	
		
			
				|  |  |  	/**
 | 
	
	
		
			
				|  | @@ -117,8 +185,8 @@ public class SyPackingListFabricController {
 | 
	
		
			
				|  |  |  	 * @param id
 | 
	
		
			
				|  |  |  	 * @return
 | 
	
		
			
				|  |  |  	 */
 | 
	
		
			
				|  |  | -	@AutoLog(value = "面料装箱单-通过id删除")
 | 
	
		
			
				|  |  | -	@ApiOperation(value="面料装箱单-通过id删除", notes="面料装箱单-通过id删除")
 | 
	
		
			
				|  |  | +	@AutoLog(value = "装箱单面料-通过id删除")
 | 
	
		
			
				|  |  | +	@ApiOperation(value="装箱单面料-通过id删除", notes="装箱单面料-通过id删除")
 | 
	
		
			
				|  |  |  	@DeleteMapping(value = "/delete")
 | 
	
		
			
				|  |  |  	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
 | 
	
		
			
				|  |  |  	    syPackingListFabricService.delMain(id);
 | 
	
	
		
			
				|  | @@ -131,8 +199,8 @@ public class SyPackingListFabricController {
 | 
	
		
			
				|  |  |  	 * @param ids
 | 
	
		
			
				|  |  |  	 * @return
 | 
	
		
			
				|  |  |  	 */
 | 
	
		
			
				|  |  | -	@AutoLog(value = "面料装箱单-批量删除")
 | 
	
		
			
				|  |  | -	@ApiOperation(value="面料装箱单-批量删除", notes="面料装箱单-批量删除")
 | 
	
		
			
				|  |  | +	@AutoLog(value = "装箱单面料-批量删除")
 | 
	
		
			
				|  |  | +	@ApiOperation(value="装箱单面料-批量删除", notes="装箱单面料-批量删除")
 | 
	
		
			
				|  |  |  	@DeleteMapping(value = "/deleteBatch")
 | 
	
		
			
				|  |  |  	public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
 | 
	
		
			
				|  |  |  		this.syPackingListFabricService.delBatchMain(Arrays.asList(ids.split(",")));
 | 
	
	
		
			
				|  | @@ -145,12 +213,21 @@ public class SyPackingListFabricController {
 | 
	
		
			
				|  |  |  	 * @param id
 | 
	
		
			
				|  |  |  	 * @return
 | 
	
		
			
				|  |  |  	 */
 | 
	
		
			
				|  |  | -	@AutoLog(value = "面料装箱单-通过id查询")
 | 
	
		
			
				|  |  | -	@ApiOperation(value="面料装箱单-通过id查询", notes="面料装箱单-通过id查询")
 | 
	
		
			
				|  |  | +	@AutoLog(value = "装箱单面料-通过id查询")
 | 
	
		
			
				|  |  | +	@ApiOperation(value="装箱单面料-通过id查询", notes="装箱单面料-通过id查询")
 | 
	
		
			
				|  |  |  	@GetMapping(value = "/queryById")
 | 
	
		
			
				|  |  | -	public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
 | 
	
		
			
				|  |  | -		SyPackingListFabric syPackingListFabric = syPackingListFabricService.getById(id);
 | 
	
		
			
				|  |  | -		return Result.OK(syPackingListFabric);
 | 
	
		
			
				|  |  | +	public Result<SyPackingListFabric> queryById(@RequestParam(name="id",required=true) String id) {
 | 
	
		
			
				|  |  | +		Result<SyPackingListFabric> result=new Result<>();
 | 
	
		
			
				|  |  | +		if(oConvertUtils.isEmpty(id)){
 | 
	
		
			
				|  |  | +			result.setSuccess(false);
 | 
	
		
			
				|  |  | +			result.setMessage("id为空");
 | 
	
		
			
				|  |  | +			return result;
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		SyPackingListFabric syPackingListFabric = syPackingListFabricService.selectById(id);
 | 
	
		
			
				|  |  | +		result.setSuccess(true);
 | 
	
		
			
				|  |  | +		result.setMessage("查询成功");
 | 
	
		
			
				|  |  | +		result.setResult(syPackingListFabric);
 | 
	
		
			
				|  |  | +		return result;
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  	
 | 
	
		
			
				|  |  |  	/**
 | 
	
	
		
			
				|  | @@ -159,8 +236,8 @@ public class SyPackingListFabricController {
 | 
	
		
			
				|  |  |  	 * @param id
 | 
	
		
			
				|  |  |  	 * @return
 | 
	
		
			
				|  |  |  	 */
 | 
	
		
			
				|  |  | -	@AutoLog(value = "面料装箱单-通过主表ID查询")
 | 
	
		
			
				|  |  | -	@ApiOperation(value="面料装箱单-通过主表ID查询", notes="面料装箱单-通过主表ID查询")
 | 
	
		
			
				|  |  | +	@AutoLog(value = "装箱单面料-通过主表ID查询")
 | 
	
		
			
				|  |  | +	@ApiOperation(value="装箱单面料-通过主表ID查询", notes="装箱单面料-通过主表ID查询")
 | 
	
		
			
				|  |  |  	@GetMapping(value = "/querySyPackingListFabricItemByMainId")
 | 
	
		
			
				|  |  |  	public Result<?> querySyPackingListFabricItemListByMainId(@RequestParam(name="id",required=true) String id) {
 | 
	
		
			
				|  |  |  		List<SyPackingListFabricItem> syPackingListFabricItemList = syPackingListFabricItemService.selectByMainId(id);
 | 
	
	
		
			
				|  | @@ -191,9 +268,9 @@ public class SyPackingListFabricController {
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        //Step.3 调用AutoPoi导出Excel
 | 
	
		
			
				|  |  |        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
 | 
	
		
			
				|  |  | -      mv.addObject(NormalExcelConstants.FILE_NAME, "面料装箱单");
 | 
	
		
			
				|  |  | +      mv.addObject(NormalExcelConstants.FILE_NAME, "装箱单面料");
 | 
	
		
			
				|  |  |        mv.addObject(NormalExcelConstants.CLASS, SyPackingListFabricPage.class);
 | 
	
		
			
				|  |  | -      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("面料装箱单数据", "导出人:"+sysUser.getRealname(), "面料装箱单"));
 | 
	
		
			
				|  |  | +      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("装箱单面料数据", "导出人:"+sysUser.getRealname(), "面料装箱单"));
 | 
	
		
			
				|  |  |        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
 | 
	
		
			
				|  |  |        return mv;
 | 
	
		
			
				|  |  |    }
 | 
	
	
		
			
				|  | @@ -237,4 +314,4 @@ public class SyPackingListFabricController {
 | 
	
		
			
				|  |  |        return Result.OK("文件导入失败!");
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | +}
 |