| | |
| | | package com.consum.base.controller; |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.pojo.*; |
| | | import com.consum.base.pojo.LWhFormScrappedExtend; |
| | | import com.consum.base.pojo.LWhFormScrappedParam; |
| | | import com.consum.base.service.LWhFormScrappedGoodsService; |
| | | import com.consum.base.service.LWhFormScrappedServiceImpl; |
| | | import com.consum.model.po.*; |
| | | import com.consum.model.vo.LWhFormOutputVo; |
| | | import com.consum.model.vo.LWhFormTransferVo; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.LWhFormScrapped; |
| | | import com.consum.model.po.LWhFormScrappedGoods; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.CollectionUtils; |
| | | import com.walker.web.ResponseValue; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @Description 报废单 |
| | |
| | | private LWhFormScrappedGoodsService scrappedGoodsService; |
| | | |
| | | /** |
| | | * @Description 新增报废单 |
| | | * @Description 新增报废单 |
| | | * @Author 卢庆阳 |
| | | * @Date 2023/11/1 |
| | | */ |
| | | @PostMapping("/add") |
| | | public ResponseValue add(@RequestBody LWhFormScrappedParam param) { |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | int result = this.lWhFormScrappedService.add(param, this.getCurrentUser(),sysInfo); |
| | | if (result > 0) return ResponseValue.success(1); |
| | | int result = this.lWhFormScrappedService.add(param, this.getCurrentUser(), sysInfo); |
| | | if (result > 0) { |
| | | return ResponseValue.success(1); |
| | | } |
| | | return ResponseValue.error("新增失败!"); |
| | | } |
| | | |
| | | /** |
| | | * @Description 列表查询 |
| | | * @Description 列表查询 |
| | | * @Author 卢庆阳 |
| | | * @Date 2023/11/02 |
| | | */ |
| | |
| | | return ResponseValue.error("登录用户信息不存在"); |
| | | } |
| | | |
| | | GenericPager genericPager = lWhFormScrappedService.queryList(param,sysInfo); |
| | | GenericPager genericPager = lWhFormScrappedService.queryList(param, sysInfo); |
| | | List<LWhFormScrapped> datas = genericPager.getDatas(); |
| | | ArrayList<LWhFormScrappedExtend> newDatas = new ArrayList<>(); |
| | | if (!CollectionUtils.isEmpty(datas)) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * @Description 根据id查询详情 |
| | | * @Description 根据id查询详情 |
| | | * @Author 卢庆阳 |
| | | * @Date 2023/11/2 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 报废明细 |
| | | * |
| | | * @param param |
| | | * @return |
| | | */ |
| | |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("登录用户信息不存在"); |
| | | } |
| | | GenericPager<Map<String, Object>> genericPager = lWhFormScrappedService.queryDetailList(param,sysInfo); |
| | | GenericPager<Map<String, Object>> genericPager = lWhFormScrappedService.queryDetailList(param, sysInfo); |
| | | return ResponseValue.success(genericPager); |
| | | } |
| | | |
| | | /** |
| | | * @Description 导出报废登记单 |
| | | * @Description 导出报废登记单 |
| | | * @Author 卢庆阳 |
| | | * @Date 2023/11/2 |
| | | */ |
| | |
| | | if (id == null) { |
| | | return ResponseValue.error("报废单id为空"); |
| | | } |
| | | LWhFormScrappedExtend scrappedExtend = this.lWhFormScrappedService.export(id,this.getSysInfo()); |
| | | LWhFormScrappedExtend scrappedExtend = this.lWhFormScrappedService.export(id, this.getSysInfo()); |
| | | return ResponseValue.success(scrappedExtend); |
| | | } |
| | | |