diff --git a/lzbi-admin/src/main/resources/application.yml b/lzbi-admin/src/main/resources/application.yml index 95f25c2..81e0beb 100644 --- a/lzbi-admin/src/main/resources/application.yml +++ b/lzbi-admin/src/main/resources/application.yml @@ -100,7 +100,7 @@ pagehelper: # Swagger配置 swagger: # 是否开启swagger - enabled: true + enabled: false # 请求前缀 pathMapping: / diff --git a/lzbi-common/src/main/java/com/lzbi/common/core/controller/BaseController.java b/lzbi-common/src/main/java/com/lzbi/common/core/controller/BaseController.java index dcd2135..89b6b3f 100644 --- a/lzbi-common/src/main/java/com/lzbi/common/core/controller/BaseController.java +++ b/lzbi-common/src/main/java/com/lzbi/common/core/controller/BaseController.java @@ -26,6 +26,7 @@ import com.lzbi.common.utils.sql.SqlUtil; * * @author ruoyi */ + public class BaseController { protected final Logger logger = LoggerFactory.getLogger(this.getClass()); diff --git a/lzbi-module/src/main/java/com/lzbi/code/service/CodeNoGenerater.java b/lzbi-module/src/main/java/com/lzbi/code/service/CodeNoGenerater.java index abad783..5904bd0 100644 --- a/lzbi-module/src/main/java/com/lzbi/code/service/CodeNoGenerater.java +++ b/lzbi-module/src/main/java/com/lzbi/code/service/CodeNoGenerater.java @@ -36,7 +36,13 @@ public class CodeNoGenerater { // String spitChar= Optional.ofNullable(ruleDao.getCodeSplitFlag()).orElse(""); spitChar=spitChar.equals("*")?"":spitChar; - codeBuffer.append(ruleDao.getCodeHeader()).append(spitChar).append(getBody(ruleDao)).append(spitChar).append(StringUtils.leftPad(serial,serialLen,'0')); + String body=getBody(ruleDao); + codeBuffer.append(ruleDao.getCodeHeader()); + if(!"".equals(body)){ + codeBuffer.append(spitChar); + codeBuffer.append(body); + } + codeBuffer.append(spitChar).append(StringUtils.leftPad(serial,serialLen,'0')); return codeBuffer.toString(); } diff --git a/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamBillMasterController.java b/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamBillMasterController.java index 587af03..4108948 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamBillMasterController.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamBillMasterController.java @@ -1,24 +1,25 @@ package com.lzbi.draft.controller; import java.util.List; -import javax.servlet.http.HttpServletResponse; + +import com.lzbi.common.utils.DateUtils; +import com.lzbi.common.utils.SecurityUtils; +import com.lzbi.draft.domain.DcBusiParamBillSub; +import com.lzbi.draft.service.DcBusiParamBillSubService; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; 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.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; + import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import com.lzbi.common.annotation.Log; import com.lzbi.common.core.controller.BaseController; import com.lzbi.common.core.domain.AjaxResult; -import com.lzbi.common.enums.BusinessType; import com.lzbi.draft.domain.DcBusiParamBillMaster; import com.lzbi.draft.service.DcBusiParamBillMasterService; -import com.lzbi.common.utils.poi.ExcelUtil; import com.lzbi.common.core.page.TableDataInfo; /** @@ -29,15 +30,21 @@ import com.lzbi.common.core.page.TableDataInfo; */ @RestController @RequestMapping("/draft/paramInBill") + public class DcBusiParamBillMasterController extends BaseController { @Autowired private DcBusiParamBillMasterService dcBusiParamBillMasterService; - + @Autowired + private DcBusiParamBillSubService dcBusiParamBillSubService; /** * 查询参数采集(录入)单据主列表 */ - @PreAuthorize("@ss.hasPermi('param:paramData:list')") + //@PreAuthorize("@ss.hasPermi('param:paramData:list')") + @ApiOperation("参数采集单详情") + @ApiImplicitParams({ + @ApiImplicitParam(name = "DcBusiParamBillMaster", value = "", dataType = "DcBusiParamBillMaster", dataTypeClass = DcBusiParamBillMaster.class), + }) @GetMapping("/list") public TableDataInfo list(DcBusiParamBillMaster dcBusiParamBillMasterDao) { @@ -46,59 +53,43 @@ public class DcBusiParamBillMasterController extends BaseController return getDataTable(list); } - /** - * 导出参数采集(录入)单据主列表 - */ - @PreAuthorize("@ss.hasPermi('param:paramData:export')") - @Log(title = "参数采集(录入)单据主", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, DcBusiParamBillMaster dcBusiParamBillMasterDao) - { - List list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); - ExcelUtil util = new ExcelUtil(DcBusiParamBillMaster.class); - util.exportExcel(response, list, "参数采集(录入)单据主数据"); + @ApiOperation("参数采集单详情") + @ApiImplicitParams({ + @ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class), + }) + @GetMapping("/detail/{billNo}") + public AjaxResult getParamInBillDetail(@PathVariable String billNo){ + DcBusiParamBillSub sub=new DcBusiParamBillSub(); + sub.setBillNo(billNo); + List list = dcBusiParamBillSubService.selectByVo(sub); + return AjaxResult.success(list); } - - /** - * 获取参数采集(录入)单据主详细信息 - */ - @PreAuthorize("@ss.hasPermi('param:paramData:query')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { - return success(dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoById(id)); + @ApiOperation("采集单驳回") + @ApiImplicitParams({ + @ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class), + }) + @GetMapping("/checkBack/{billNo}") + public AjaxResult checkParamInBillBack(@PathVariable String billNo){ + DcBusiParamBillMaster master=new DcBusiParamBillMaster(); + master.setBillNo(billNo); + master.setUpdatedBy(SecurityUtils.getUsername()); + master.setCreatedTime(DateUtils.getNowDate()); + master.setCheckStatus("9"); + return AjaxResult.success(dcBusiParamBillMasterService.checkBill(master)); } - /** - * 新增参数采集(录入)单据主 - */ - @PreAuthorize("@ss.hasPermi('param:paramData:add')") - @Log(title = "参数采集(录入)单据主", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody DcBusiParamBillMaster dcBusiParamBillMasterDao) - { - return toAjax(dcBusiParamBillMasterService.insertDcBusiParamBillMasterDao(dcBusiParamBillMasterDao)); - } - - /** - * 修改参数采集(录入)单据主 - */ - @PreAuthorize("@ss.hasPermi('param:paramData:edit')") - @Log(title = "参数采集(录入)单据主", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody DcBusiParamBillMaster dcBusiParamBillMasterDao) - { - return toAjax(dcBusiParamBillMasterService.updateDcBusiParamBillMasterDao(dcBusiParamBillMasterDao)); + @ApiOperation("采集单审核") + @ApiImplicitParams({ + @ApiImplicitParam(name = "billNo", value = "", dataType = "String", dataTypeClass = String.class), + }) + @GetMapping("/check/{billNo}") + public AjaxResult checkParamInBill(@PathVariable String billNo){ + DcBusiParamBillMaster master=new DcBusiParamBillMaster(); + master.setUpdatedBy(SecurityUtils.getUsername()); + master.setCreatedTime(DateUtils.getNowDate()); + master.setBillNo(billNo); + master.setCheckStatus("1"); + return AjaxResult.success(dcBusiParamBillMasterService.checkBill(master)); } - /** - * 删除参数采集(录入)单据主 - */ - @PreAuthorize("@ss.hasPermi('param:paramData:remove')") - @Log(title = "参数采集(录入)单据主", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { - return toAjax(dcBusiParamBillMasterService.deleteDcBusiParamBillMasterDaoByIds(ids)); - } } diff --git a/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiParamBillMasterMapper.java b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiParamBillMasterMapper.java index 1dc92a6..40c56e7 100644 --- a/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiParamBillMasterMapper.java +++ b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiParamBillMasterMapper.java @@ -46,6 +46,7 @@ public interface DcBusiParamBillMasterMapper extends BaseMapper - + diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml index 6fa61b2..14e469a 100644 --- a/lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml +++ b/lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml @@ -6,7 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillMasterMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillMasterMapper.xml index c1f9098..733cf82 100644 --- a/lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillMasterMapper.xml +++ b/lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillMasterMapper.xml @@ -63,6 +63,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bill_type = #{billType} and check_type = #{checkType} and check_status = #{checkStatus} + and CREATED_BY = #{createdBy} + and company_id = #{companyId} + and company_name like concat('%', #{companyName}, '%') + and organize_name like concat('%', #{organizeName}, '%') + and oragnize_id = #{oragnizeId} + @@ -135,7 +141,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where id = #{id} - + + update dc_busi_param_bill_master + + TENANT_ID = #{tenantId}, + REVISION = #{revision}, + CREATED_BY = #{createdBy}, + CREATED_TIME = #{createdTime}, + UPDATED_BY = #{updatedBy}, + UPDATED_TIME = #{updatedTime}, + DELETE_BY = #{deleteBy}, + DELETE_TIME = #{deleteTime}, + bill_income_date = #{billIncomeDate}, + bill_type = #{billType}, + check_type = #{checkType}, + check_status = #{checkStatus}, + + where bill_no = #{billNo} + delete from dc_busi_param_bill_master where id = #{id} @@ -154,7 +177,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + delete from dc_busi_param_bill_sub where bill_no = #{billNo} diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillSubMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillSubMapper.xml index d4332c6..0a6c769 100644 --- a/lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillSubMapper.xml +++ b/lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillSubMapper.xml @@ -14,7 +14,8 @@ - + + @@ -50,7 +51,8 @@ bill_no, asset_code, asset_name, - field_type, + field_code, + field_name, param_name, param_code, param_uint, @@ -74,7 +76,8 @@ and bill_no = #{billNo} and asset_code = #{assetCode} and asset_name = #{assetName} - and field_type = #{fieldType} + and field_code = #{fieldCode} + and field_name = #{fieldName} and param_name = #{paramName} and param_code = #{paramCode} and param_uint = #{paramUint} @@ -99,7 +102,8 @@ bill_no, asset_code, asset_name, - field_type, + field_code, + field_name, param_name, param_code, param_uint, @@ -120,7 +124,8 @@ #{billNo}, #{assetCode}, #{assetName}, - #{fieldType}, + #{fieldCode}, + #{fieldName}, #{paramName}, #{paramCode}, #{paramUint},