1 文件已重命名
5个文件已添加
2个文件已删除
12个文件已修改
| | |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.web.ResponseValue; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.TreeMap; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @Description ç©ååç±» |
| | |
| | | import com.consum.base.service.BaseGoodsTemplateServiceImpl; |
| | | import com.consum.base.service.BaseWarehouseServiceImpl; |
| | | import com.consum.base.service.LWhGoodsService; |
| | | import com.consum.model.po.*; |
| | | import com.consum.model.po.BaseGoodsModels; |
| | | import com.consum.model.po.BaseGoodsTemplate; |
| | | import com.consum.model.po.BaseWarehouse; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.SDictData; |
| | | import com.consum.model.vo.BaseGoodsTemplateVo; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @Description ç©åæ¨¡æ¿ |
| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @Description ä»åºç®¡ç |
| | |
| | | */ |
| | | @GetMapping("/select/tenant_warehouse") |
| | | public ResponseValue getByAgencyId(Long agencyId) { |
| | | // TODO ææ æºæ |
| | | // if (agencyId == null) { |
| | | // return ResponseValue.error("æºæid为空"); |
| | | // } |
| | | if (agencyId == null) { |
| | | return ResponseValue.success(new ArrayList<>()); |
| | | } |
| | | List<BaseWarehouse> list = this.baseWarehouseService.getByAgencyId(agencyId, null, null); |
| | | if (list == null) { |
| | | return ResponseValue.error("æ¥è¯¢å¤±è´¥ï¼"); |
| | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.pojo.request.WarehouseManagerParam; |
| | | import com.consum.base.service.BaseWarehouseManagerServiceImpl; |
| | | import com.consum.base.service.BaseWarehouseManagerService; |
| | | import com.consum.model.po.BaseWarehouseManager; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.walker.web.ResponseValue; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | public class BaseWarehouseManagerController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BaseWarehouseManagerServiceImpl baseWarehouseManagerService; |
| | | private BaseWarehouseManagerService baseWarehouseManagerService; |
| | | |
| | | /** |
| | | * @Description æ°å¢ |
| | |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("请å
ç»å½"); |
| | | } |
| | | this.baseWarehouseManagerService.add(param); |
| | | baseWarehouseManagerService.add(param); |
| | | return ResponseValue.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ¥è¯¢", notes = "æ¥è¯¢") |
| | | @ApiOperation(value = "æ ¹æ®ä»åºidæ¥è¯¢åºç®¡å", notes = "æ ¹æ®ä»åºidæ¥è¯¢åºç®¡å") |
| | | @ApiImplicitParam(name = "warehouseId", value = "ä»åºid", required = true, dataType = "Long") |
| | | @GetMapping("/list") |
| | | public ResponseValue select(Long warehouseId) { |
| | | BaseWarehouseManager baseWarehouseManager = new BaseWarehouseManager(); |
| | | baseWarehouseManager.setBaseWarehouseId(warehouseId); |
| | | List<BaseWarehouseManager> select = this.baseWarehouseManagerService.select(baseWarehouseManager); |
| | | return ResponseValue.success(select); |
| | | List<BaseWarehouseManager> baseWarehouseManagerList = baseWarehouseManagerService.selectWarehouseManager(warehouseId); |
| | | return ResponseValue.success(baseWarehouseManagerList); |
| | | } |
| | | |
| | | @ApiOperation(value = "æ ¹æ®ä»åº,æºæidæ¥è¯¢åºç®¡å", notes = "æ ¹æ®ä»åº,æºæidæ¥è¯¢åºç®¡å") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "warehouseId", value = "ä»åºid", required = true, dataType = "Long"), |
| | | @ApiImplicitParam(name = "agencyId", value = "æºæid", required = true, dataType = "Long") |
| | | }) |
| | | @GetMapping("/query") |
| | | public ResponseValue selectManagerList(Long warehouseId, Long agencyId) { |
| | | List<BaseWarehouseManager> baseWarehouseManagerList = baseWarehouseManagerService.selectManagerList(warehouseId, agencyId); |
| | | return ResponseValue.success(baseWarehouseManagerList); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import cn.afterturn.easypoi.excel.ExcelExportUtil; |
| | | import cn.afterturn.easypoi.excel.entity.TemplateExportParams; |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.core.utils.PageUtil; |
| | | import com.consum.base.pojo.excel.InventoryExcelTemplate; |
| | | import com.consum.base.pojo.query.LWhFormInventoryQry; |
| | | import com.consum.base.pojo.request.FormInventoryParam; |
| | | import com.consum.base.pojo.request.LWhFormInventoryParam; |
| | |
| | | import com.consum.model.po.LWhFormInventory; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.CollectionUtils; |
| | | import com.walker.infrastructure.utils.DateUtils; |
| | | import com.walker.web.ResponseValue; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.Optional; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | |
| | | return ResponseValue.success(formInventoryVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "çç¹å导åº", notes = "çç¹å导åº") |
| | | @GetMapping("/list/export") |
| | | public void export(Long id, HttpServletResponse response) throws IOException { |
| | | |
| | | List<InventoryExcelTemplate> exportList = lWhFormInventoryService.getExportList(id); |
| | | if (CollectionUtils.isEmpty(exportList)) { |
| | | throw new RuntimeException("æ°æ®ä¸ºç©º"); |
| | | } |
| | | TemplateExportParams params = new TemplateExportParams("import/ä½å¼æèåçç¹è¡¨.xls"); |
| | | params.setHeadingStartRow(2); |
| | | |
| | | Optional<InventoryExcelTemplate> first = exportList.stream().findFirst(); |
| | | InventoryExcelTemplate inventoryExcelTemplate = first.get(); |
| | | Long createTime = inventoryExcelTemplate.getCreateTime(); |
| | | String operatorName = inventoryExcelTemplate.getOperatorName(); |
| | | String monitorName = inventoryExcelTemplate.getMonitorName(); |
| | | Long endTime = inventoryExcelTemplate.getEndTime(); |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("date", DateUtils.toShowDate(createTime)); |
| | | map.put("endDate", DateUtils.toShowDate(endTime)); |
| | | map.put("monitorName", monitorName); |
| | | map.put("name", operatorName); |
| | | Workbook workbook = ExcelExportUtil.exportExcel(params, InventoryExcelTemplate.class, |
| | | exportList, map); |
| | | |
| | | downLoadExcel("ä½å¼æèåçç¹è¡¨", response, workbook); |
| | | } |
| | | |
| | | private void downLoadExcel(String fileName, HttpServletResponse response, Workbook workbook) { |
| | | try (OutputStream out = response.getOutputStream()) { |
| | | response.setCharacterEncoding("UTF-8"); |
| | | response.setHeader("content-Type", "application/vnd.ms-excel"); |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName + ".xls", "UTF-8")); |
| | | ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
| | | workbook.write(baos); |
| | | response.setHeader("Content-Length", String.valueOf(baos.size())); |
| | | out.write(baos.toByteArray()); |
| | | } catch (Exception e) { |
| | | logger.error("å¯¼åºæä»¶å¤±è´¥", e); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | LWhFormOutput lWhFormOutput = lWhFormOutputService.get(new LWhFormOutput(id)); |
| | | LWhFormOutputExtendVO lWhFormOutputExtendVO = new LWhFormOutputExtendVO(); |
| | | BeanUtils.copyProperties(lWhFormOutput, lWhFormOutputExtendVO); |
| | | lWhFormOutputExtendVO.setDoc(lWhFormOutput.getOutputDoc()); |
| | | |
| | | String sql = "SELECT bgt.id, CATEGORY_ID, CATEGORY_NAME, GOODS_NAME " |
| | | + "FROM l_wh_procure_model pm LEFT JOIN base_goods_models bgm ON bgm.id = pm.BASE_GOODS_MODELS_ID " |
| | |
| | | package com.consum.base.controller; |
| | | |
| | | import cn.afterturn.easypoi.excel.ExcelExportUtil; |
| | | import cn.afterturn.easypoi.excel.entity.ExportParams; |
| | | import cn.afterturn.easypoi.excel.entity.TemplateExportParams; |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.core.utils.MapUtils; |
| | | import com.consum.base.core.utils.MapperUtil; |
| | | import com.consum.base.core.utils.PageUtil; |
| | | import com.consum.base.pojo.LWhFormScrappedParam; |
| | | import com.consum.base.pojo.excel.ScrappedInfoExport; |
| | | import com.consum.base.pojo.excel.ScrappedInfoExcelTemplate; |
| | | import com.consum.base.pojo.query.LWhFormScrappedQry; |
| | | import com.consum.base.pojo.response.FromTransferTemplateInfoVO; |
| | | import com.consum.base.pojo.response.LWhFormScrappedExtendVO; |
| | |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.LWhFormScrapped; |
| | | import com.walker.infrastructure.utils.CollectionUtils; |
| | | import com.walker.infrastructure.utils.DateUtils; |
| | | import com.walker.web.ResponseValue; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @Description æ¥åºå |
| | |
| | | * @Author å¢åºé³ |
| | | * @Date 2023/11/2 |
| | | */ |
| | | @GetMapping("/export") |
| | | public ResponseValue export(Long id, HttpServletRequest request, HttpServletResponse response) { |
| | | @GetMapping("/list/export") |
| | | public void export(Long id, HttpServletResponse response) { |
| | | if (id == null) { |
| | | return ResponseValue.error("æ¥åºåid为空"); |
| | | throw new RuntimeException("æ¥åºåid为空"); |
| | | } |
| | | try { |
| | | OutputStream outputStream = response.getOutputStream(); |
| | | List<Map<String, Object>> export = lWhFormScrappedService.export(id); |
| | | ExportParams exportParams = new ExportParams("æ¥åºåç»è®°", "æ¥åºåç»è®°"); |
| | | Workbook sheets = ExcelExportUtil.exportExcel(exportParams, ScrappedInfoExport.class, export); |
| | | List<ScrappedInfoExcelTemplate> export = lWhFormScrappedService.export(id); |
| | | if (CollectionUtils.isEmpty(export)) { |
| | | throw new RuntimeException("æ°æ®ä¸ºç©º"); |
| | | } |
| | | TemplateExportParams exportParams = new TemplateExportParams("import/æ¥åºç»è®°å.xlsx"); |
| | | exportParams.setHeadingStartRow(2); |
| | | |
| | | Optional<ScrappedInfoExcelTemplate> first = export.stream().findFirst(); |
| | | ScrappedInfoExcelTemplate scrappedInfoExcelTemplate = first.get(); |
| | | Long dealTime = scrappedInfoExcelTemplate.getDealTime(); |
| | | String operatorName = scrappedInfoExcelTemplate.getOperatorName(); |
| | | String businessFormCode = scrappedInfoExcelTemplate.getBusinessFormCode(); |
| | | |
| | | int countNum = export.stream().filter(item -> item.getNum() != null).mapToInt(ScrappedInfoExcelTemplate::getNum).sum(); |
| | | int totalAmount = export.stream().filter(item -> item.getTotalAmount() != null).mapToInt(ScrappedInfoExcelTemplate::getTotalAmount).sum(); |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("code", businessFormCode); |
| | | map.put("date", DateUtils.toShowDate(dealTime)); |
| | | map.put("name", operatorName); |
| | | map.put("countNum", countNum); |
| | | map.put("totalAmount", totalAmount); |
| | | |
| | | Workbook sheets = ExcelExportUtil.exportExcel(exportParams, ScrappedInfoExcelTemplate.class, export, map); |
| | | // 设置ååºå¤´ |
| | | response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"); |
| | | response.setHeader("Content-disposition", "attachment;filename=" + URLEncoder.encode("æ¥åºåç»è®°.xlsx", "utf-8")); |
| | |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return ResponseValue.success(); |
| | | |
| | | |
| | | } |
| | | |
| | | |
New file |
| | |
| | | package com.consum.base.pojo.excel; |
| | | |
| | | import cn.afterturn.easypoi.excel.annotation.Excel; |
| | | import cn.afterturn.easypoi.excel.annotation.ExcelIgnore; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author asus |
| | | * @version 1.0 |
| | | * @description: çç¹å导åºexcel |
| | | * @date 2023/11/30 16:41 |
| | | */ |
| | | @Data |
| | | public class InventoryExcelTemplate implements Serializable { |
| | | |
| | | |
| | | @Excel(name = "åä½") |
| | | private String tenantName; |
| | | @Excel(name = "ç©ååç§°") |
| | | private String templateName; |
| | | @Excel(name = "ç©ååå·/è§æ ¼") |
| | | private String baseModelName; |
| | | @Excel(name = "åºåæ°é") |
| | | private Integer stockNum; |
| | | @Excel(name = "çç¹æ°é") |
| | | private Integer num; |
| | | @Excel(name = "éé¢") |
| | | private Integer totalAmount; |
| | | @Excel(name = "çç¹æ¯å¦ä¸è´(æ¯/å¦)") |
| | | private String inventoryDeception; |
| | | @Excel(name = "çç¹å·®å¼æè¿°") |
| | | private String deception; |
| | | @Excel(name = "夿³¨") |
| | | private String remark; |
| | | @ExcelIgnore |
| | | private String operatorName; |
| | | @ExcelIgnore |
| | | private Long createTime; |
| | | @ExcelIgnore |
| | | private Long endTime; |
| | | @ExcelIgnore |
| | | private String monitorName; |
| | | @ExcelIgnore |
| | | private Integer inventoryResult; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.consum.base.pojo.excel; |
| | | |
| | | import cn.afterturn.easypoi.excel.annotation.Excel; |
| | | import cn.afterturn.easypoi.excel.annotation.ExcelIgnore; |
| | | import java.io.Serializable; |
| | | import lombok.Data; |
| | | |
| | | |
| | | /** |
| | | * @author asus |
| | | * @version 1.0 |
| | | * @description: æ¥åºå导åºexcel |
| | | * @date 2023/11/30 16:41 |
| | | */ |
| | | @Data |
| | | public class ScrappedInfoExcelTemplate implements Serializable { |
| | | |
| | | |
| | | @Excel(name = "åä½") |
| | | private String tenantName; |
| | | @Excel(name = "ç©ååç§°") |
| | | private String templateName; |
| | | @Excel(name = "ç©ååå·/è§æ ¼") |
| | | private String baseModelName; |
| | | |
| | | @Excel(name = "æ°é") |
| | | private Integer num; |
| | | @Excel(name = "éé¢") |
| | | private Integer totalAmount; |
| | | |
| | | @Excel(name = "æ¥åºåå ") |
| | | private String deception; |
| | | @Excel(name = "夿³¨") |
| | | private String remark; |
| | | |
| | | @ExcelIgnore |
| | | private String businessFormCode; |
| | | @ExcelIgnore |
| | | private Long dealTime; |
| | | @ExcelIgnore |
| | | private String operatorName; |
| | | |
| | | |
| | | } |
| | |
| | | private Long dealTime; |
| | | |
| | | // åºåºæç» |
| | | private Long doc; |
| | | private String doc; |
| | | |
| | | private List<FormOutputGoodsVO> fromOutputGoods; |
| | | } |
New file |
| | |
| | | package com.consum.base.service; |
| | | |
| | | import com.consum.base.pojo.request.WarehouseManagerParam; |
| | | import com.consum.model.po.BaseWarehouseManager; |
| | | import com.walker.jdbc.service.BaseService; |
| | | import java.util.List; |
| | | |
| | | public interface BaseWarehouseManagerService extends BaseService { |
| | | |
| | | void add(WarehouseManagerParam list) throws Exception; |
| | | |
| | | List<BaseWarehouseManager> selectWarehouseManager(Long warehouseId); |
| | | |
| | | List<BaseWarehouseManager> selectManagerList(Long warehouseId, Long agencyId); |
| | | } |
| | |
| | | import com.consum.base.core.utils.MapUtils; |
| | | import com.consum.base.core.utils.MapperUtil; |
| | | import com.consum.base.core.utils.PageUtil; |
| | | import com.consum.base.pojo.excel.InventoryExcelTemplate; |
| | | import com.consum.base.pojo.query.LWhFormInventoryQry; |
| | | import com.consum.base.pojo.request.FormInventoryParam; |
| | | import com.consum.base.pojo.request.LWhFormInventoryParam; |
| | |
| | | formInventoryVO.setFormInventoryGoodsList(goodsVOList); |
| | | return formInventoryVO; |
| | | } |
| | | |
| | | public List<InventoryExcelTemplate> getExportList(Long id) { |
| | | String sql = "SELECT\n" |
| | | + "\tfi.INVENTORY_DATE createTime,\n" |
| | | + "\tfi.STOP_TIME endTime,\n" |
| | | + "\tfi.OPERATOR_NAME,\n" |
| | | + "\tfi.OPERATOR_NAME2 monitorName,\n" |
| | | + "\tfi.AGENCY_NAME tenantName,\n" |
| | | + "\tfig.GOODS_TEMPLATE_NAME templateName,\n" |
| | | + "\tfig.BASE_GOODS_MODELS_NAME baseModelName,\n" |
| | | + "\tfig.INVENTORY_COUNTS num,\n" |
| | | + "\tfig.INIT_COUNTS stockNum,\n" |
| | | + "\tfig.INVENTORY_RESULT,\n" |
| | | + "\tBEIZ1 remark\n" |
| | | + "FROM\n" |
| | | + "\tl_wh_form_inventory fi\n" |
| | | + "\tLEFT JOIN l_wh_form_inventory_goods fig ON fi.ID = fig.WH_FORM_INVENTORY_ID\n" |
| | | + "WHERE\n" |
| | | + "\tfi.ID = :id"; |
| | | HashMap<String, Object> param = new HashMap<>(); |
| | | param.put("id", id); |
| | | List<Map<String, Object>> select = this.select(sql, param, new MapperUtil()); |
| | | if (CollectionUtils.isEmpty(select)) { |
| | | return null; |
| | | } |
| | | List<InventoryExcelTemplate> list = Lists.newArrayList(); |
| | | select.forEach(item -> { |
| | | InventoryExcelTemplate inventoryExcelTemplate = MapUtils.convertMapToObj(item, InventoryExcelTemplate.class); |
| | | list.add(inventoryExcelTemplate); |
| | | }); |
| | | return list; |
| | | |
| | | } |
| | | } |
| | |
| | | import com.consum.base.pojo.LWhFormScrappedGoodsInfoParam; |
| | | import com.consum.base.pojo.LWhFormScrappedGoodsModelParams; |
| | | import com.consum.base.pojo.LWhFormScrappedParam; |
| | | import com.consum.base.pojo.excel.ScrappedInfoExcelTemplate; |
| | | import com.consum.base.pojo.query.LWhFormScrappedQry; |
| | | import com.consum.base.pojo.response.FormScrappedGoodsDetailVO; |
| | | import com.consum.base.pojo.response.FormScrappedGoodsVO; |
| | | import com.consum.base.pojo.response.GoodsModelVO; |
| | | import com.consum.base.pojo.response.LWhFormScrappedExtendVO; |
| | | import com.consum.model.po.*; |
| | | import com.consum.model.po.BaseGoodsModels; |
| | | import com.consum.model.po.BaseGoodsTemplate; |
| | | import com.consum.model.po.BaseWarehouse; |
| | | import com.consum.model.po.FinSysTenantDepartment; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.consum.model.po.LWhFormScrapped; |
| | | import com.consum.model.po.LWhFormScrappedGoods; |
| | | import com.consum.model.po.SDictData; |
| | | import com.iplatform.model.po.S_user_core; |
| | | import com.walker.db.page.GenericPager; |
| | | import com.walker.infrastructure.utils.StringUtils; |
| | | import com.walker.jdbc.service.BaseServiceImpl; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | import java.util.stream.Collectors; |
| | | import org.apache.commons.compress.utils.Lists; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @Description æ¥åºå |
| | |
| | | return pageUtil; |
| | | } |
| | | |
| | | public List<Map<String, Object>> export(Long id) { |
| | | |
| | | public List<ScrappedInfoExcelTemplate> export(Long id) { |
| | | String sql = |
| | | "SELECT BUSINESS_FORM_CODE, fs.DEAL_TIME, OPERATOR_NAME, AGENCY_NAME, GOODS_TEMPLATE_NAME, BASE_GOODS_MODELS_NAME, DEPARTMENT_NAME, COUNTS, SCRAPPED_NAME, BEIZ " |
| | | + "FROM l_wh_form_scrapped_goods fsg LEFT JOIN l_wh_form_scrapped fs ON fs.id = fsg.FORM_SCRAPPED_ID WHERE " |
| | | + "fs.ID = :id and STATES = 1"; |
| | | "SELECT\n" |
| | | + "\tBUSINESS_FORM_CODE,\n" |
| | | + "\tfs.DEAL_TIME,\n" |
| | | + "\tOPERATOR_NAME,\n" |
| | | + "\tAGENCY_NAME tenantName,\n" |
| | | + "\tGOODS_TEMPLATE_NAME templateName,\n" |
| | | + "\tBASE_GOODS_MODELS_NAME baseModelName,\n" |
| | | + "\tCOUNTS num,\n" |
| | | + "\tSCRAPPED_NAME deception,\n" |
| | | + "\tBEIZ remark\n" |
| | | + "FROM\n" |
| | | + "\tl_wh_form_scrapped_goods fsg\n" |
| | | + "\tLEFT JOIN l_wh_form_scrapped fs ON fs.id = fsg.FORM_SCRAPPED_ID\n" |
| | | + "WHERE\n" |
| | | + "\tfs.ID = :id\n" |
| | | + "\tAND STATES = 1"; |
| | | Map<String, Object> param = new HashMap<>(); |
| | | param.put("id", id); |
| | | List<Map<String, Object>> select = this.select(sql, param, new MapperUtil()); |
| | | return select; |
| | | if (CollectionUtils.isEmpty(select)) { |
| | | return null; |
| | | } |
| | | List<ScrappedInfoExcelTemplate> list = Lists.newArrayList(); |
| | | select.forEach(item -> { |
| | | ScrappedInfoExcelTemplate inventoryExcelTemplate = MapUtils.convertMapToObj(item, ScrappedInfoExcelTemplate.class); |
| | | list.add(inventoryExcelTemplate); |
| | | }); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * @Description å¯¼åºæ¥åºç»è®°å |
| | | * @Author å¢åºé³ |
| | | * @Date 2023/11/2 |
| | | */ |
| | | // public LWhFormScrappedExtendVO export(Long id, FinSysTenantUser sysInfo) { |
| | | // LWhFormScrappedExtendVO scrappedExtend = new LWhFormScrappedExtendVO(); |
| | | // //1.æ¥è¯¢æ¥åºå |
| | | // LWhFormScrapped lWhFormScrapped = this.get(new LWhFormScrapped(id)); |
| | | // if (lWhFormScrapped != null) { |
| | | // lWhFormScrapped.setDealTime(DateUtils.getDateTimeNumber(System.currentTimeMillis())); |
| | | // lWhFormScrapped.setOperatorName(sysInfo.getUserName()); |
| | | // BeanUtils.copyProperties(lWhFormScrapped, scrappedExtend); |
| | | // } |
| | | // //2.æ¥è¯¢æ¥åºåç©å |
| | | // List<LWhFormScrappedGoods> scrappedGoodsList = this.scrappedGoodsService.getByFormScrappedId(id); |
| | | // if (!CollectionUtils.isEmpty(scrappedGoodsList)) { |
| | | // scrappedExtend.setScrappedGoodsList(scrappedGoodsList); |
| | | // } |
| | | // return scrappedExtend; |
| | | // } |
| | | |
| | | } |
| | |
| | | @Autowired |
| | | private LWhProcureModelUserRecordServiceImpl lWhProcureModelUserRecordService; |
| | | @Autowired |
| | | private BaseWarehouseManagerServiceImpl baseWarehouseManagerService; |
| | | private BaseWarehouseManagerService baseWarehouseManagerService; |
| | | @Autowired |
| | | private BaseGoodsTemplateServiceImpl baseGoodsTemplateService; |
| | | |
| | |
| | | Long id = sysInfo.getId(); |
| | | BaseWarehouseManager manager = new BaseWarehouseManager(); |
| | | manager.setManagerId(id); |
| | | List<BaseWarehouseManager> managerList = baseWarehouseManagerService.select(manager); |
| | | List<BaseWarehouseManager> managerList = baseWarehouseManagerService.selectAll(manager); |
| | | if (CollectionUtils.isEmpty(managerList)) { |
| | | log.error("è¯¥ç¨æ·ä¸æ¯åºç®¡å"); |
| | | throw new Exception("è¯¥ç¨æ·ä¸æ¯åºç®¡å"); |
File was renamed from consum-base/src/main/java/com/consum/base/service/BaseWarehouseManagerServiceImpl.java |
| | |
| | | package com.consum.base.service; |
| | | package com.consum.base.service.impl; |
| | | |
| | | import com.consum.base.core.utils.IdUtil; |
| | | import com.consum.base.pojo.WarehouseManagerInfo; |
| | | import com.consum.base.pojo.request.WarehouseManagerParam; |
| | | import com.consum.base.service.BaseWarehouseManagerService; |
| | | import com.consum.base.service.FinSysTenantUserServiceImpl; |
| | | import com.consum.model.po.BaseWarehouseManager; |
| | | import com.consum.model.po.FinSysTenantUser; |
| | | import com.iplatform.model.po.S_role; |
| | |
| | | * @Date 2023/10/23 |
| | | */ |
| | | @Service |
| | | public class BaseWarehouseManagerServiceImpl extends BaseServiceImpl { |
| | | public class BaseWarehouseManagerServiceImpl extends BaseServiceImpl implements BaseWarehouseManagerService { |
| | | |
| | | @Autowired |
| | | private FinSysTenantUserServiceImpl finSysTenantUserService; |
| | | |
| | | |
| | | /** |
| | | * @Description æ°å¢ |
| | | * @Author å¢åºé³ |
| | | * @Date 2023/10/26 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void add(WarehouseManagerParam list) throws Exception { |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<BaseWarehouseManager> selectWarehouseManager(Long warehouseId) { |
| | | BaseWarehouseManager baseWarehouseManager = new BaseWarehouseManager(); |
| | | baseWarehouseManager.setBaseWarehouseId(warehouseId); |
| | | List<BaseWarehouseManager> select = this.select(baseWarehouseManager); |
| | | return select; |
| | | } |
| | | |
| | | @Override |
| | | public List<BaseWarehouseManager> selectManagerList(Long warehouseId, Long agencyId) { |
| | | StringBuilder sql = new StringBuilder("select * from base_warehouse_manager bwm left join base_warehouse bw on bwm.base_warehouse_id = bw.id " |
| | | + "where 1=1 "); |
| | | Map<String, Object> param = new HashMap<>(); |
| | | if (warehouseId != null) { |
| | | param.put("warehouseId", warehouseId); |
| | | sql.append("and bwm.BASE_WAREHOUSE_ID =:warehouseId "); |
| | | } |
| | | if (agencyId != null) { |
| | | param.put("agencyId", agencyId); |
| | | sql.append("and bw.agency_id =:agencyId "); |
| | | } |
| | | List<BaseWarehouseManager> select = this.select(sql.toString(), param, new BaseWarehouseManager()); |
| | | return select; |
| | | } |
| | | |
| | | |
| | | } |