From 1f50c6f1f85b30f52d370c8cae1e7aae0780bf20 Mon Sep 17 00:00:00 2001 From: zhousq Date: Tue, 28 Nov 2023 17:24:47 +0800 Subject: [PATCH] =?UTF-8?q?2023-11-28=20=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90=E5=99=A8=EF=BC=8C=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=BD=95=E5=85=A5=E5=8D=95=E5=92=8C=E6=8C=87?= =?UTF-8?q?=E6=A0=87=E5=BA=95=E7=A8=BF=E8=A1=A8=EF=BC=88=E6=97=A5=EF=BC=89?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lzbi/generator/util/VelocityUtils.java | 18 +- .../main/resources/vm/java/controller.java.vm | 32 +- .../src/main/resources/vm/java/domain.java.vm | 55 +- .../src/main/resources/vm/java/mapper.java.vm | 30 +- .../vm/java/mybits/controller.java.vm | 115 ++++ .../resources/vm/java/mybits/domain.java.vm | 105 ++++ .../resources/vm/java/mybits/mapper.java.vm | 91 +++ .../main/resources/vm/java/mybits/readme.txt | 1 + .../resources/vm/java/mybits/service.java.vm | 61 ++ .../vm/java/{ => mybits}/serviceImpl.java.vm | 0 .../vm/java/mybits/sub-domain.java.vm | 76 +++ .../main/resources/vm/java/service.java.vm | 134 +++- .../main/resources/vm/java/sub-domain.java.vm | 4 +- .../src/main/resources/vm/vue/index.vue.vm | 2 +- .../resources/vm/vue/v2/index-tree.vue.vm | 474 ++++++++++++++ .../src/main/resources/vm/vue/v2/index.vue.vm | 590 ++++++++++++++++++ .../src/main/resources/vm/vue/v2/readme.txt | 1 + .../src/main/resources/vm/xml/mapper.xml.vm | 20 +- .../lzbi/asset/domain/DcBaseParamModel.java | 2 +- .../DcBusiParamBillMasterController.java | 104 +++ .../DcBusiTargetDraftDayController.java | 104 +++ .../domain/DcBusiParamBillMasterDao.java | 94 +++ .../draft/domain/DcBusiParamBillSubDao.java | 98 +++ .../draft/domain/DcBusiTargetDraftDayDao.java | 110 ++++ .../mapper/DcBusiParamBillMasterMapper.java | 90 +++ .../mapper/DcBusiTargetDraftDayMapper.java | 64 ++ .../service/DcBusiParamBillMasterService.java | 130 ++++ .../service/DcBusiTargetDraftDayService.java | 92 +++ .../controller/CodeRuleDefineController.java | 2 +- .../controller/CodeRuleSerialController.java | 63 +- .../DcBaseWorkSpecialController.java | 105 ++++ .../special/domain/DcBaseWorkSpecialDao.java | 171 +++++ .../mapper/DcBaseWorkSpecialMapper.java | 65 ++ .../service/DcBaseWorkSpecialService.java | 95 +++ .../mapper/asset/DcBaseWorkSpecialMapper.xml | 93 +++ .../asset/DcBusiParamBillMasterMapper.xml | 157 +++++ .../asset/DcBusiTargetDraftDayMapper.xml | 158 +++++ 37 files changed, 3429 insertions(+), 177 deletions(-) create mode 100644 lzbi-generator/src/main/resources/vm/java/mybits/controller.java.vm create mode 100644 lzbi-generator/src/main/resources/vm/java/mybits/domain.java.vm create mode 100644 lzbi-generator/src/main/resources/vm/java/mybits/mapper.java.vm create mode 100644 lzbi-generator/src/main/resources/vm/java/mybits/readme.txt create mode 100644 lzbi-generator/src/main/resources/vm/java/mybits/service.java.vm rename lzbi-generator/src/main/resources/vm/java/{ => mybits}/serviceImpl.java.vm (100%) create mode 100644 lzbi-generator/src/main/resources/vm/java/mybits/sub-domain.java.vm create mode 100644 lzbi-generator/src/main/resources/vm/vue/v2/index-tree.vue.vm create mode 100644 lzbi-generator/src/main/resources/vm/vue/v2/index.vue.vm create mode 100644 lzbi-generator/src/main/resources/vm/vue/v2/readme.txt create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamBillMasterController.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetDraftDayController.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMasterDao.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillSubDao.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDayDao.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiParamBillMasterMapper.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetDraftDayMapper.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiParamBillMasterService.java create mode 100644 lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetDraftDayService.java create mode 100644 lzbi-module/src/main/java/com/lzbi/special/controller/DcBaseWorkSpecialController.java create mode 100644 lzbi-module/src/main/java/com/lzbi/special/domain/DcBaseWorkSpecialDao.java create mode 100644 lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java create mode 100644 lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java create mode 100644 lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml create mode 100644 lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillMasterMapper.xml create mode 100644 lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftDayMapper.xml diff --git a/lzbi-generator/src/main/java/com/lzbi/generator/util/VelocityUtils.java b/lzbi-generator/src/main/java/com/lzbi/generator/util/VelocityUtils.java index 18ef507..6979658 100644 --- a/lzbi-generator/src/main/java/com/lzbi/generator/util/VelocityUtils.java +++ b/lzbi-generator/src/main/java/com/lzbi/generator/util/VelocityUtils.java @@ -132,7 +132,7 @@ public class VelocityUtils templates.add("vm/java/domain.java.vm"); templates.add("vm/java/mapper.java.vm"); templates.add("vm/java/service.java.vm"); - templates.add("vm/java/serviceImpl.java.vm"); + //templates.add("vm/java/service.java.vm"); templates.add("vm/java/controller.java.vm"); templates.add("vm/xml/mapper.xml.vm"); templates.add("vm/sql/sql.vm"); @@ -169,17 +169,17 @@ public class VelocityUtils // 业务名称 String businessName = genTable.getBusinessName(); - String javaPath = PROJECT_PATH + "/" + StringUtils.replace(packageName, ".", "/"); + String javaPath = PROJECT_PATH + "/" + StringUtils.replace(packageName, ".", "/") ; String mybatisPath = MYBATIS_PATH + "/" + moduleName; String vuePath = "vue"; if (template.contains("domain.java.vm")) { - fileName = StringUtils.format("{}/domain/{}.java", javaPath, className); + fileName = StringUtils.format("{}/domain/{}Dao.java", javaPath, className); } if (template.contains("sub-domain.java.vm") && StringUtils.equals(GenConstants.TPL_SUB, genTable.getTplCategory())) { - fileName = StringUtils.format("{}/domain/{}.java", javaPath, genTable.getSubTable().getClassName()); + fileName = StringUtils.format("{}/domain/{}Dao.java", javaPath, genTable.getSubTable().getClassName()); } else if (template.contains("mapper.java.vm")) { @@ -187,12 +187,12 @@ public class VelocityUtils } else if (template.contains("service.java.vm")) { - fileName = StringUtils.format("{}/service/I{}Service.java", javaPath, className); - } - else if (template.contains("serviceImpl.java.vm")) - { - fileName = StringUtils.format("{}/service/impl/{}ServiceImpl.java", javaPath, className); + fileName = StringUtils.format("{}/service/{}Service.java", javaPath, className); } +// else if (template.contains("service.java.vm")) +// { +// fileName = StringUtils.format("{}/service/impl/{}ServiceImpl.java", javaPath, className); +// } else if (template.contains("controller.java.vm")) { fileName = StringUtils.format("{}/controller/{}Controller.java", javaPath, className); diff --git a/lzbi-generator/src/main/resources/vm/java/controller.java.vm b/lzbi-generator/src/main/resources/vm/java/controller.java.vm index 4ff3626..61d8620 100644 --- a/lzbi-generator/src/main/resources/vm/java/controller.java.vm +++ b/lzbi-generator/src/main/resources/vm/java/controller.java.vm @@ -16,8 +16,8 @@ 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 ${packageName}.domain.${ClassName}; -import ${packageName}.service.I${ClassName}Service; +import ${packageName}.domain.${ClassName}Dao; +import ${packageName}.service.${ClassName}Service; import com.lzbi.common.utils.poi.ExcelUtil; #if($table.crud || $table.sub) import com.lzbi.common.core.page.TableDataInfo; @@ -35,7 +35,7 @@ import com.lzbi.common.core.page.TableDataInfo; public class ${ClassName}Controller extends BaseController { @Autowired - private I${ClassName}Service ${className}Service; + private ${ClassName}Service ${className}Service; /** * 查询${functionName}列表 @@ -43,16 +43,16 @@ public class ${ClassName}Controller extends BaseController @PreAuthorize("@ss.hasPermi('${permissionPrefix}:list')") @GetMapping("/list") #if($table.crud || $table.sub) - public TableDataInfo list(${ClassName} ${className}) + public TableDataInfo list(${ClassName}Dao ${className}Dao) { startPage(); - List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); + List<${ClassName}Dao> list = ${className}Service.select${ClassName}DaoList(${className}Dao); return getDataTable(list); } #elseif($table.tree) - public AjaxResult list(${ClassName} ${className}) + public AjaxResult list(${ClassName}Dao ${className}Dao) { - List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); + List<${ClassName}Dao> list = ${className}Service.select${ClassName}DaoList(${className}Dao); return success(list); } #end @@ -63,10 +63,10 @@ public class ${ClassName}Controller extends BaseController @PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')") @Log(title = "${functionName}", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, ${ClassName} ${className}) + public void export(HttpServletResponse response, ${ClassName}Dao ${className}Dao) { - List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); - ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}.class); + List<${ClassName}Dao> list = ${className}Service.select${ClassName}DaoList(${className}Dao); + ExcelUtil<${ClassName}Dao> util = new ExcelUtil<${ClassName}Dao>(${ClassName}Dao.class); util.exportExcel(response, list, "${functionName}数据"); } @@ -77,7 +77,7 @@ public class ${ClassName}Controller extends BaseController @GetMapping(value = "/{${pkColumn.javaField}}") public AjaxResult getInfo(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) { - return success(${className}Service.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField})); + return success(${className}Service.select${ClassName}DaoBy${pkColumn.capJavaField}(${pkColumn.javaField})); } /** @@ -86,9 +86,9 @@ public class ${ClassName}Controller extends BaseController @PreAuthorize("@ss.hasPermi('${permissionPrefix}:add')") @Log(title = "${functionName}", businessType = BusinessType.INSERT) @PostMapping - public AjaxResult add(@RequestBody ${ClassName} ${className}) + public AjaxResult add(@RequestBody ${ClassName}Dao ${className}Dao) { - return toAjax(${className}Service.insert${ClassName}(${className})); + return toAjax(${className}Service.insert${ClassName}Dao(${className}Dao)); } /** @@ -97,9 +97,9 @@ public class ${ClassName}Controller extends BaseController @PreAuthorize("@ss.hasPermi('${permissionPrefix}:edit')") @Log(title = "${functionName}", businessType = BusinessType.UPDATE) @PutMapping - public AjaxResult edit(@RequestBody ${ClassName} ${className}) + public AjaxResult edit(@RequestBody ${ClassName}Dao ${className}Dao) { - return toAjax(${className}Service.update${ClassName}(${className})); + return toAjax(${className}Service.update${ClassName}Dao(${className}Dao)); } /** @@ -110,6 +110,6 @@ public class ${ClassName}Controller extends BaseController @DeleteMapping("/{${pkColumn.javaField}s}") public AjaxResult remove(@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s) { - return toAjax(${className}Service.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s)); + return toAjax(${className}Service.delete${ClassName}DaoBy${pkColumn.capJavaField}s(${pkColumn.javaField}s)); } } diff --git a/lzbi-generator/src/main/resources/vm/java/domain.java.vm b/lzbi-generator/src/main/resources/vm/java/domain.java.vm index 939b19a..0091972 100644 --- a/lzbi-generator/src/main/resources/vm/java/domain.java.vm +++ b/lzbi-generator/src/main/resources/vm/java/domain.java.vm @@ -5,9 +5,10 @@ import ${import}; #end import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; +import lombok.Data; import com.lzbi.common.annotation.Excel; #if($table.crud || $table.sub) -import com.lzbi.common.core.domain.BaseEntity; +import com.lzbi.module.base.BaseModuleEntity; #elseif($table.tree) import com.lzbi.common.core.domain.TreeEntity; #end @@ -19,11 +20,12 @@ import com.lzbi.common.core.domain.TreeEntity; * @date ${datetime} */ #if($table.crud || $table.sub) -#set($Entity="BaseEntity") +#set($Entity="BaseModuleEntity") #elseif($table.tree) #set($Entity="TreeEntity") #end -public class ${ClassName} extends ${Entity} + @Data +public class ${ClassName}Dao extends ${Entity} { private static final long serialVersionUID = 1L; @@ -55,51 +57,4 @@ public class ${ClassName} extends ${Entity} private List<${subClassName}> ${subclassName}List; #end -#foreach ($column in $columns) -#if(!$table.isSuperColumn($column.javaField)) -#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) -#set($AttrName=$column.javaField) -#else -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) -#end - public void set${AttrName}($column.javaType $column.javaField) - { - this.$column.javaField = $column.javaField; - } - - public $column.javaType get${AttrName}() - { - return $column.javaField; - } -#end -#end - -#if($table.sub) - public List<${subClassName}> get${subClassName}List() - { - return ${subclassName}List; - } - - public void set${subClassName}List(List<${subClassName}> ${subclassName}List) - { - this.${subclassName}List = ${subclassName}List; - } - -#end - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) -#foreach ($column in $columns) -#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) -#set($AttrName=$column.javaField) -#else -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) -#end - .append("${column.javaField}", get${AttrName}()) -#end -#if($table.sub) - .append("${subclassName}List", get${subClassName}List()) -#end - .toString(); - } } diff --git a/lzbi-generator/src/main/resources/vm/java/mapper.java.vm b/lzbi-generator/src/main/resources/vm/java/mapper.java.vm index 7e7d7c2..7042b2e 100644 --- a/lzbi-generator/src/main/resources/vm/java/mapper.java.vm +++ b/lzbi-generator/src/main/resources/vm/java/mapper.java.vm @@ -1,7 +1,8 @@ package ${packageName}.mapper; import java.util.List; -import ${packageName}.domain.${ClassName}; +import ${packageName}.domain.${ClassName}Dao; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; #if($table.sub) import ${packageName}.domain.${subClassName}; #end @@ -12,7 +13,8 @@ import ${packageName}.domain.${subClassName}; * @author ${author} * @date ${datetime} */ -public interface ${ClassName}Mapper + +public interface ${ClassName}Mapper extends BaseMapper<${ClassName}Dao> { /** * 查询${functionName} @@ -20,23 +22,23 @@ public interface ${ClassName}Mapper * @param ${pkColumn.javaField} ${functionName}主键 * @return ${functionName} */ - public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); + public ${ClassName}Dao select${ClassName}DaoBy${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); /** * 查询${functionName}列表 * - * @param ${className} ${functionName} + * @param ${className}Dao ${functionName} * @return ${functionName}集合 */ - public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); + public List<${ClassName}Dao> select${ClassName}DaoList(${ClassName}Dao ${className}Dao); /** * 新增${functionName} * - * @param ${className} ${functionName} + * @param ${className}Dao ${functionName} * @return 结果 */ - public int insert${ClassName}(${ClassName} ${className}); + public int insert${ClassName}Dao(${ClassName}Dao ${className}Dao); /** * 修改${functionName} @@ -44,7 +46,7 @@ public interface ${ClassName}Mapper * @param ${className} ${functionName} * @return 结果 */ - public int update${ClassName}(${ClassName} ${className}); + public int update${ClassName}Dao(${ClassName}Dao ${className}Dao); /** * 删除${functionName} @@ -52,7 +54,7 @@ public interface ${ClassName}Mapper * @param ${pkColumn.javaField} ${functionName}主键 * @return 结果 */ - public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); + public int delete${ClassName}DaoBy${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); /** * 批量删除${functionName} @@ -60,7 +62,7 @@ public interface ${ClassName}Mapper * @param ${pkColumn.javaField}s 需要删除的数据主键集合 * @return 结果 */ - public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); + public int delete${ClassName}DaoBy${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); #if($table.sub) /** @@ -69,15 +71,15 @@ public interface ${ClassName}Mapper * @param ${pkColumn.javaField}s 需要删除的数据主键集合 * @return 结果 */ - public int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); + public int delete${subClassName}DaoBy${subTableFkClassName}Daos(${pkColumn.javaType}[] ${pkColumn.javaField}s); /** * 批量新增${subTable.functionName} * - * @param ${subclassName}List ${subTable.functionName}列表 + * @param ${subclassName}DaoList ${subTable.functionName}列表 * @return 结果 */ - public int batch${subClassName}(List<${subClassName}> ${subclassName}List); + public int batch${subClassNameDao}(List<${subClassName}Dao> ${subclassName}DaoList); /** @@ -86,6 +88,6 @@ public interface ${ClassName}Mapper * @param ${pkColumn.javaField} ${functionName}ID * @return 结果 */ - public int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField}); + public int delete${subClassName}DaoBy${subTableFkClassName}Dao(${pkColumn.javaType} ${pkColumn.javaField}); #end } diff --git a/lzbi-generator/src/main/resources/vm/java/mybits/controller.java.vm b/lzbi-generator/src/main/resources/vm/java/mybits/controller.java.vm new file mode 100644 index 0000000..4ff3626 --- /dev/null +++ b/lzbi-generator/src/main/resources/vm/java/mybits/controller.java.vm @@ -0,0 +1,115 @@ +package ${packageName}.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +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 ${packageName}.domain.${ClassName}; +import ${packageName}.service.I${ClassName}Service; +import com.lzbi.common.utils.poi.ExcelUtil; +#if($table.crud || $table.sub) +import com.lzbi.common.core.page.TableDataInfo; +#elseif($table.tree) +#end + +/** + * ${functionName}Controller + * + * @author ${author} + * @date ${datetime} + */ +@RestController +@RequestMapping("/${moduleName}/${businessName}") +public class ${ClassName}Controller extends BaseController +{ + @Autowired + private I${ClassName}Service ${className}Service; + + /** + * 查询${functionName}列表 + */ + @PreAuthorize("@ss.hasPermi('${permissionPrefix}:list')") + @GetMapping("/list") +#if($table.crud || $table.sub) + public TableDataInfo list(${ClassName} ${className}) + { + startPage(); + List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); + return getDataTable(list); + } +#elseif($table.tree) + public AjaxResult list(${ClassName} ${className}) + { + List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); + return success(list); + } +#end + + /** + * 导出${functionName}列表 + */ + @PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')") + @Log(title = "${functionName}", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ${ClassName} ${className}) + { + List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); + ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}.class); + util.exportExcel(response, list, "${functionName}数据"); + } + + /** + * 获取${functionName}详细信息 + */ + @PreAuthorize("@ss.hasPermi('${permissionPrefix}:query')") + @GetMapping(value = "/{${pkColumn.javaField}}") + public AjaxResult getInfo(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) + { + return success(${className}Service.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField})); + } + + /** + * 新增${functionName} + */ + @PreAuthorize("@ss.hasPermi('${permissionPrefix}:add')") + @Log(title = "${functionName}", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody ${ClassName} ${className}) + { + return toAjax(${className}Service.insert${ClassName}(${className})); + } + + /** + * 修改${functionName} + */ + @PreAuthorize("@ss.hasPermi('${permissionPrefix}:edit')") + @Log(title = "${functionName}", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody ${ClassName} ${className}) + { + return toAjax(${className}Service.update${ClassName}(${className})); + } + + /** + * 删除${functionName} + */ + @PreAuthorize("@ss.hasPermi('${permissionPrefix}:remove')") + @Log(title = "${functionName}", businessType = BusinessType.DELETE) + @DeleteMapping("/{${pkColumn.javaField}s}") + public AjaxResult remove(@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s) + { + return toAjax(${className}Service.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s)); + } +} diff --git a/lzbi-generator/src/main/resources/vm/java/mybits/domain.java.vm b/lzbi-generator/src/main/resources/vm/java/mybits/domain.java.vm new file mode 100644 index 0000000..939b19a --- /dev/null +++ b/lzbi-generator/src/main/resources/vm/java/mybits/domain.java.vm @@ -0,0 +1,105 @@ +package ${packageName}.domain; + +#foreach ($import in $importList) +import ${import}; +#end +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.lzbi.common.annotation.Excel; +#if($table.crud || $table.sub) +import com.lzbi.common.core.domain.BaseEntity; +#elseif($table.tree) +import com.lzbi.common.core.domain.TreeEntity; +#end + +/** + * ${functionName}对象 ${tableName} + * + * @author ${author} + * @date ${datetime} + */ +#if($table.crud || $table.sub) +#set($Entity="BaseEntity") +#elseif($table.tree) +#set($Entity="TreeEntity") +#end +public class ${ClassName} extends ${Entity} +{ + private static final long serialVersionUID = 1L; + +#foreach ($column in $columns) +#if(!$table.isSuperColumn($column.javaField)) + /** $column.columnComment */ +#if($column.list) +#set($parentheseIndex=$column.columnComment.indexOf("(")) +#if($parentheseIndex != -1) +#set($comment=$column.columnComment.substring(0, $parentheseIndex)) +#else +#set($comment=$column.columnComment) +#end +#if($parentheseIndex != -1) + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") +#elseif($column.javaType == 'Date') + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd") +#else + @Excel(name = "${comment}") +#end +#end + private $column.javaType $column.javaField; + +#end +#end +#if($table.sub) + /** $table.subTable.functionName信息 */ + private List<${subClassName}> ${subclassName}List; + +#end +#foreach ($column in $columns) +#if(!$table.isSuperColumn($column.javaField)) +#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) +#set($AttrName=$column.javaField) +#else +#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) +#end + public void set${AttrName}($column.javaType $column.javaField) + { + this.$column.javaField = $column.javaField; + } + + public $column.javaType get${AttrName}() + { + return $column.javaField; + } +#end +#end + +#if($table.sub) + public List<${subClassName}> get${subClassName}List() + { + return ${subclassName}List; + } + + public void set${subClassName}List(List<${subClassName}> ${subclassName}List) + { + this.${subclassName}List = ${subclassName}List; + } + +#end + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) +#foreach ($column in $columns) +#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) +#set($AttrName=$column.javaField) +#else +#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) +#end + .append("${column.javaField}", get${AttrName}()) +#end +#if($table.sub) + .append("${subclassName}List", get${subClassName}List()) +#end + .toString(); + } +} diff --git a/lzbi-generator/src/main/resources/vm/java/mybits/mapper.java.vm b/lzbi-generator/src/main/resources/vm/java/mybits/mapper.java.vm new file mode 100644 index 0000000..7e7d7c2 --- /dev/null +++ b/lzbi-generator/src/main/resources/vm/java/mybits/mapper.java.vm @@ -0,0 +1,91 @@ +package ${packageName}.mapper; + +import java.util.List; +import ${packageName}.domain.${ClassName}; +#if($table.sub) +import ${packageName}.domain.${subClassName}; +#end + +/** + * ${functionName}Mapper接口 + * + * @author ${author} + * @date ${datetime} + */ +public interface ${ClassName}Mapper +{ + /** + * 查询${functionName} + * + * @param ${pkColumn.javaField} ${functionName}主键 + * @return ${functionName} + */ + public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); + + /** + * 查询${functionName}列表 + * + * @param ${className} ${functionName} + * @return ${functionName}集合 + */ + public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); + + /** + * 新增${functionName} + * + * @param ${className} ${functionName} + * @return 结果 + */ + public int insert${ClassName}(${ClassName} ${className}); + + /** + * 修改${functionName} + * + * @param ${className} ${functionName} + * @return 结果 + */ + public int update${ClassName}(${ClassName} ${className}); + + /** + * 删除${functionName} + * + * @param ${pkColumn.javaField} ${functionName}主键 + * @return 结果 + */ + public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); + + /** + * 批量删除${functionName} + * + * @param ${pkColumn.javaField}s 需要删除的数据主键集合 + * @return 结果 + */ + public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); +#if($table.sub) + + /** + * 批量删除${subTable.functionName} + * + * @param ${pkColumn.javaField}s 需要删除的数据主键集合 + * @return 结果 + */ + public int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); + + /** + * 批量新增${subTable.functionName} + * + * @param ${subclassName}List ${subTable.functionName}列表 + * @return 结果 + */ + public int batch${subClassName}(List<${subClassName}> ${subclassName}List); + + + /** + * 通过${functionName}主键删除${subTable.functionName}信息 + * + * @param ${pkColumn.javaField} ${functionName}ID + * @return 结果 + */ + public int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField}); +#end +} diff --git a/lzbi-generator/src/main/resources/vm/java/mybits/readme.txt b/lzbi-generator/src/main/resources/vm/java/mybits/readme.txt new file mode 100644 index 0000000..5b6e764 --- /dev/null +++ b/lzbi-generator/src/main/resources/vm/java/mybits/readme.txt @@ -0,0 +1 @@ +原若依3.8.6自带的mybits版本代码,如需使用替换上级目录的文件 \ No newline at end of file diff --git a/lzbi-generator/src/main/resources/vm/java/mybits/service.java.vm b/lzbi-generator/src/main/resources/vm/java/mybits/service.java.vm new file mode 100644 index 0000000..264882b --- /dev/null +++ b/lzbi-generator/src/main/resources/vm/java/mybits/service.java.vm @@ -0,0 +1,61 @@ +package ${packageName}.service; + +import java.util.List; +import ${packageName}.domain.${ClassName}; + +/** + * ${functionName}Service接口 + * + * @author ${author} + * @date ${datetime} + */ +public interface I${ClassName}Service +{ + /** + * 查询${functionName} + * + * @param ${pkColumn.javaField} ${functionName}主键 + * @return ${functionName} + */ + public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); + + /** + * 查询${functionName}列表 + * + * @param ${className} ${functionName} + * @return ${functionName}集合 + */ + public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); + + /** + * 新增${functionName} + * + * @param ${className} ${functionName} + * @return 结果 + */ + public int insert${ClassName}(${ClassName} ${className}); + + /** + * 修改${functionName} + * + * @param ${className} ${functionName} + * @return 结果 + */ + public int update${ClassName}(${ClassName} ${className}); + + /** + * 批量删除${functionName} + * + * @param ${pkColumn.javaField}s 需要删除的${functionName}主键集合 + * @return 结果 + */ + public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); + + /** + * 删除${functionName}信息 + * + * @param ${pkColumn.javaField} ${functionName}主键 + * @return 结果 + */ + public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); +} diff --git a/lzbi-generator/src/main/resources/vm/java/serviceImpl.java.vm b/lzbi-generator/src/main/resources/vm/java/mybits/serviceImpl.java.vm similarity index 100% rename from lzbi-generator/src/main/resources/vm/java/serviceImpl.java.vm rename to lzbi-generator/src/main/resources/vm/java/mybits/serviceImpl.java.vm diff --git a/lzbi-generator/src/main/resources/vm/java/mybits/sub-domain.java.vm b/lzbi-generator/src/main/resources/vm/java/mybits/sub-domain.java.vm new file mode 100644 index 0000000..1b23ea5 --- /dev/null +++ b/lzbi-generator/src/main/resources/vm/java/mybits/sub-domain.java.vm @@ -0,0 +1,76 @@ +package ${packageName}.domain; + +#foreach ($import in $subImportList) +import ${import}; +#end +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.lzbi.common.annotation.Excel; +import com.lzbi.common.core.domain.BaseEntity; + +/** + * ${subTable.functionName}对象 ${subTableName} + * + * @author ${author} + * @date ${datetime} + */ +public class ${subClassName} extends BaseEntity +{ + private static final long serialVersionUID = 1L; + +#foreach ($column in $subTable.columns) +#if(!$table.isSuperColumn($column.javaField)) + /** $column.columnComment */ +#if($column.list) +#set($parentheseIndex=$column.columnComment.indexOf("(")) +#if($parentheseIndex != -1) +#set($comment=$column.columnComment.substring(0, $parentheseIndex)) +#else +#set($comment=$column.columnComment) +#end +#if($parentheseIndex != -1) + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") +#elseif($column.javaType == 'Date') + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd") +#else + @Excel(name = "${comment}") +#end +#end + private $column.javaType $column.javaField; + +#end +#end +#foreach ($column in $subTable.columns) +#if(!$table.isSuperColumn($column.javaField)) +#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) +#set($AttrName=$column.javaField) +#else +#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) +#end + public void set${AttrName}($column.javaType $column.javaField) + { + this.$column.javaField = $column.javaField; + } + + public $column.javaType get${AttrName}() + { + return $column.javaField; + } +#end +#end + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) +#foreach ($column in $subTable.columns) +#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) +#set($AttrName=$column.javaField) +#else +#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) +#end + .append("${column.javaField}", get${AttrName}()) +#end + .toString(); + } +} diff --git a/lzbi-generator/src/main/resources/vm/java/service.java.vm b/lzbi-generator/src/main/resources/vm/java/service.java.vm index 264882b..3e5df42 100644 --- a/lzbi-generator/src/main/resources/vm/java/service.java.vm +++ b/lzbi-generator/src/main/resources/vm/java/service.java.vm @@ -1,55 +1,123 @@ package ${packageName}.service; import java.util.List; -import ${packageName}.domain.${ClassName}; - +#foreach ($column in $columns) +#if($column.javaField == 'createTime' || $column.javaField == 'updateTime') +import com.lzbi.common.utils.DateUtils; +#break +#end +#end +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +#if($table.sub) +import java.util.ArrayList; +import com.lzbi.common.utils.DateUtils; +import org.springframework.transaction.annotation.Transactional; +import ${packageName}.domain.${subClassName}Dao; +#end +import ${packageName}.domain.${ClassName}Dao; +import ${packageName}.mapper.${ClassName}Mapper; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; /** - * ${functionName}Service接口 + * ${functionName}Service业务层处理 * * @author ${author} * @date ${datetime} */ -public interface I${ClassName}Service +@Service +public class ${ClassName}Service extends ServiceImpl<${ClassName}Mapper, ${ClassName}Dao> implements IService<${ClassName}Dao> { + /** * 查询${functionName} * * @param ${pkColumn.javaField} ${functionName}主键 * @return ${functionName} */ - public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); + public ${ClassName}Dao select${ClassName}DaoBy${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}) + { + return baseMapper.select${ClassName}DaoBy${pkColumn.capJavaField}(${pkColumn.javaField}); + } /** * 查询${functionName}列表 * - * @param ${className} ${functionName} - * @return ${functionName}集合 + * @param ${className}Dao ${functionName} + * @return ${functionName} */ - public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); + public List<${ClassName}Dao> select${ClassName}DaoList(${ClassName}Dao ${className}Dao) + { + return baseMapper.select${ClassName}DaoList(${className}Dao); + } /** * 新增${functionName} * - * @param ${className} ${functionName} + * @param ${className}Dao ${functionName} * @return 结果 */ - public int insert${ClassName}(${ClassName} ${className}); +#if($table.sub) + @Transactional +#end + + public int insert${ClassName}Dao(${ClassName}Dao ${className}Dao) + { +#foreach ($column in $columns) +#if($column.javaField == 'createdTime') + ${className}Dao.setCreatedTime(DateUtils.getNowDate()); +#end +#end +#if($table.sub) + int rows = ${className}Mapper.insert${ClassName}Dao(${className}Dao); + insert${subClassName}Dao(${className}Dao); + return rows; +#else + return baseMapper.insert${ClassName}Dao(${className}Dao); +#end + } /** * 修改${functionName} * - * @param ${className} ${functionName} + * @param ${className}Dao ${functionName} * @return 结果 */ - public int update${ClassName}(${ClassName} ${className}); +#if($table.sub) + @Transactional +#end + + public int update${ClassName}Dao(${ClassName}Dao ${className}Dao) + { +#foreach ($column in $columns) +#if($column.javaField == 'updatedTime') + ${className}Dao.setUpdatedTime(DateUtils.getNowDate()); +#end +#end +#if($table.sub) + ${className}Mapper.delete${subClassName}DaoBy${subTableFkClassName}(${className}Dao.get${pkColumn.capJavaField}()); + insert${subClassName}Dao(${className}Dao); +#end + return baseMapper.update${ClassName}Dao(${className}Dao); + } /** * 批量删除${functionName} * - * @param ${pkColumn.javaField}s 需要删除的${functionName}主键集合 + * @param ${pkColumn.javaField}s 需要删除的${functionName}主键 * @return 结果 */ - public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); +#if($table.sub) + @Transactional +#end + + public int delete${ClassName}DaoBy${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s) + { +#if($table.sub) + baseMapper.delete${subClassName}DaoBy${subTableFkClassName}s(${pkColumn.javaField}s); +#end + return baseMapper.delete${ClassName}DaoBy${pkColumn.capJavaField}s(${pkColumn.javaField}s); + } /** * 删除${functionName}信息 @@ -57,5 +125,41 @@ public interface I${ClassName}Service * @param ${pkColumn.javaField} ${functionName}主键 * @return 结果 */ - public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); +#if($table.sub) + @Transactional +#end + + public int delete${ClassName}DaoBy${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}) + { +#if($table.sub) + baseMapper.delete${subClassName}DaoBy${subTableFkClassName}(${pkColumn.javaField}); +#end + return baseMapper.delete${ClassName}DaoBy${pkColumn.capJavaField}(${pkColumn.javaField}); + } +#if($table.sub) + + /** + * 新增${subTable.functionName}信息 + * + * @param ${className}Dao ${functionName}对象 + */ + public void insert${subClassName}Dao(${ClassName}Dao ${className}Dao) + { + List<${subClassName}Dao> ${subclassName}DaoList = ${className}Dao.get${subClassName}DaoList(); + ${pkColumn.javaType} ${pkColumn.javaField} = ${className}.get${pkColumn.capJavaField}(); + if (StringUtils.isNotNull(${subclassName}DaoList)) + { + List<${subClassName}Dao> list = new ArrayList<${subClassName}Dao>(); + for (${subClassName}Dao ${subclassName}Dao : ${subclassName}DaoList) + { + ${subclassName}Dao.set${subTableFkClassName}(${pkColumn.javaField}); + list.add(${subclassName}Dao); + } + if (list.size() > 0) + { + baseMapper.batch${subClassName}Dao(list); + } + } + } +#end } diff --git a/lzbi-generator/src/main/resources/vm/java/sub-domain.java.vm b/lzbi-generator/src/main/resources/vm/java/sub-domain.java.vm index 1b23ea5..4a39080 100644 --- a/lzbi-generator/src/main/resources/vm/java/sub-domain.java.vm +++ b/lzbi-generator/src/main/resources/vm/java/sub-domain.java.vm @@ -6,7 +6,7 @@ import ${import}; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.lzbi.common.annotation.Excel; -import com.lzbi.common.core.domain.BaseEntity; +import com.lzbi.module.base.BaseModuleEntity; /** * ${subTable.functionName}对象 ${subTableName} @@ -14,7 +14,7 @@ import com.lzbi.common.core.domain.BaseEntity; * @author ${author} * @date ${datetime} */ -public class ${subClassName} extends BaseEntity +public class ${subClassName}Dao extends BaseModuleEntity { private static final long serialVersionUID = 1L; diff --git a/lzbi-generator/src/main/resources/vm/vue/index.vue.vm b/lzbi-generator/src/main/resources/vm/vue/index.vue.vm index 22c1d7f..26db658 100644 --- a/lzbi-generator/src/main/resources/vm/vue/index.vue.vm +++ b/lzbi-generator/src/main/resources/vm/vue/index.vue.vm @@ -163,7 +163,7 @@ /> - + #foreach($column in $columns) #set($field=$column.javaField) diff --git a/lzbi-generator/src/main/resources/vm/vue/v2/index-tree.vue.vm b/lzbi-generator/src/main/resources/vm/vue/v2/index-tree.vue.vm new file mode 100644 index 0000000..c54d62b --- /dev/null +++ b/lzbi-generator/src/main/resources/vm/vue/v2/index-tree.vue.vm @@ -0,0 +1,474 @@ + + + diff --git a/lzbi-generator/src/main/resources/vm/vue/v2/index.vue.vm b/lzbi-generator/src/main/resources/vm/vue/v2/index.vue.vm new file mode 100644 index 0000000..22c1d7f --- /dev/null +++ b/lzbi-generator/src/main/resources/vm/vue/v2/index.vue.vm @@ -0,0 +1,590 @@ + + + diff --git a/lzbi-generator/src/main/resources/vm/vue/v2/readme.txt b/lzbi-generator/src/main/resources/vm/vue/v2/readme.txt new file mode 100644 index 0000000..68960a9 --- /dev/null +++ b/lzbi-generator/src/main/resources/vm/vue/v2/readme.txt @@ -0,0 +1 @@ +ԭ v2汾Ĵģ \ No newline at end of file diff --git a/lzbi-generator/src/main/resources/vm/xml/mapper.xml.vm b/lzbi-generator/src/main/resources/vm/xml/mapper.xml.vm index 0ceb3d8..3f71180 100644 --- a/lzbi-generator/src/main/resources/vm/xml/mapper.xml.vm +++ b/lzbi-generator/src/main/resources/vm/xml/mapper.xml.vm @@ -4,18 +4,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + #foreach ($column in $columns) #end #if($table.sub) - - + + - + #foreach ($column in $subTable.columns) #end @@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end from ${tableName} - #foreach($column in $columns) @@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - #if($table.crud || $table.tree) where ${pkColumn.columnName} = #{${pkColumn.javaField}} @@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #end - + insert into ${tableName} #foreach($column in $columns) @@ -90,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + update ${tableName} #foreach($column in $columns) @@ -102,11 +102,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where ${pkColumn.columnName} = #{${pkColumn.javaField}} - + delete from ${tableName} where ${pkColumn.columnName} = #{${pkColumn.javaField}} - + delete from ${tableName} where ${pkColumn.columnName} in #{${pkColumn.javaField}} diff --git a/lzbi-module/src/main/java/com/lzbi/asset/domain/DcBaseParamModel.java b/lzbi-module/src/main/java/com/lzbi/asset/domain/DcBaseParamModel.java index 912c2d7..4455be5 100644 --- a/lzbi-module/src/main/java/com/lzbi/asset/domain/DcBaseParamModel.java +++ b/lzbi-module/src/main/java/com/lzbi/asset/domain/DcBaseParamModel.java @@ -19,7 +19,7 @@ import com.lzbi.module.base.BaseModuleEntity; @AllArgsConstructor @Accessors(chain = true) @ApiModel(value = "参数模版表",description = "") -//@TableName("dc_base_param_model") +@TableName("dc_base_param_model") public class DcBaseParamModel extends BaseModuleEntity{ /** 主键 */ 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 new file mode 100644 index 0000000..931a971 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiParamBillMasterController.java @@ -0,0 +1,104 @@ +package com.lzbi.draft.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +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.DcBusiParamBillMasterDao; +import com.lzbi.draft.service.DcBusiParamBillMasterService; +import com.lzbi.common.utils.poi.ExcelUtil; +import com.lzbi.common.core.page.TableDataInfo; + +/** + * 参数采集(录入)单据主Controller + * + * @author win + * @date 2023-11-28 + */ +@RestController +@RequestMapping("/asset/paramData") +public class DcBusiParamBillMasterController extends BaseController +{ + @Autowired + private DcBusiParamBillMasterService dcBusiParamBillMasterService; + + /** + * 查询参数采集(录入)单据主列表 + */ + @PreAuthorize("@ss.hasPermi('param:paramData:list')") + @GetMapping("/list") + public TableDataInfo list(DcBusiParamBillMasterDao dcBusiParamBillMasterDao) + { + startPage(); + List list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); + return getDataTable(list); + } + + /** + * 导出参数采集(录入)单据主列表 + */ + @PreAuthorize("@ss.hasPermi('param:paramData:export')") + @Log(title = "参数采集(录入)单据主", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DcBusiParamBillMasterDao dcBusiParamBillMasterDao) + { + List list = dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); + ExcelUtil util = new ExcelUtil(DcBusiParamBillMasterDao.class); + util.exportExcel(response, list, "参数采集(录入)单据主数据"); + } + + /** + * 获取参数采集(录入)单据主详细信息 + */ + @PreAuthorize("@ss.hasPermi('param:paramData:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(dcBusiParamBillMasterService.selectDcBusiParamBillMasterDaoById(id)); + } + + /** + * 新增参数采集(录入)单据主 + */ + @PreAuthorize("@ss.hasPermi('param:paramData:add')") + @Log(title = "参数采集(录入)单据主", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DcBusiParamBillMasterDao dcBusiParamBillMasterDao) + { + return toAjax(dcBusiParamBillMasterService.insertDcBusiParamBillMasterDao(dcBusiParamBillMasterDao)); + } + + /** + * 修改参数采集(录入)单据主 + */ + @PreAuthorize("@ss.hasPermi('param:paramData:edit')") + @Log(title = "参数采集(录入)单据主", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DcBusiParamBillMasterDao dcBusiParamBillMasterDao) + { + return toAjax(dcBusiParamBillMasterService.updateDcBusiParamBillMasterDao(dcBusiParamBillMasterDao)); + } + + /** + * 删除参数采集(录入)单据主 + */ + @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/controller/DcBusiTargetDraftDayController.java b/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetDraftDayController.java new file mode 100644 index 0000000..c287bf7 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/controller/DcBusiTargetDraftDayController.java @@ -0,0 +1,104 @@ +package com.lzbi.draft.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +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.DcBusiTargetDraftDayDao; +import com.lzbi.draft.service.DcBusiTargetDraftDayService; +import com.lzbi.common.utils.poi.ExcelUtil; +import com.lzbi.common.core.page.TableDataInfo; + +/** + * 指标数据底稿(日)Controller + * + * @author win + * @date 2023-11-28 + */ +@RestController +@RequestMapping("/asset/targetDay") +public class DcBusiTargetDraftDayController extends BaseController +{ + @Autowired + private DcBusiTargetDraftDayService dcBusiTargetDraftDayService; + + /** + * 查询指标数据底稿(日)列表 + */ + @PreAuthorize("@ss.hasPermi('target:targetDay:list')") + @GetMapping("/list") + public TableDataInfo list(DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao) + { + startPage(); + List list = dcBusiTargetDraftDayService.selectDcBusiTargetDraftDayDaoList(dcBusiTargetDraftDayDao); + return getDataTable(list); + } + + /** + * 导出指标数据底稿(日)列表 + */ + @PreAuthorize("@ss.hasPermi('target:targetDay:export')") + @Log(title = "指标数据底稿(日)", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao) + { + List list = dcBusiTargetDraftDayService.selectDcBusiTargetDraftDayDaoList(dcBusiTargetDraftDayDao); + ExcelUtil util = new ExcelUtil(DcBusiTargetDraftDayDao.class); + util.exportExcel(response, list, "指标数据底稿(日)数据"); + } + + /** + * 获取指标数据底稿(日)详细信息 + */ + @PreAuthorize("@ss.hasPermi('target:targetDay:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(dcBusiTargetDraftDayService.selectDcBusiTargetDraftDayDaoById(id)); + } + + /** + * 新增指标数据底稿(日) + */ + @PreAuthorize("@ss.hasPermi('target:targetDay:add')") + @Log(title = "指标数据底稿(日)", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao) + { + return toAjax(dcBusiTargetDraftDayService.insertDcBusiTargetDraftDayDao(dcBusiTargetDraftDayDao)); + } + + /** + * 修改指标数据底稿(日) + */ + @PreAuthorize("@ss.hasPermi('target:targetDay:edit')") + @Log(title = "指标数据底稿(日)", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao) + { + return toAjax(dcBusiTargetDraftDayService.updateDcBusiTargetDraftDayDao(dcBusiTargetDraftDayDao)); + } + + /** + * 删除指标数据底稿(日) + */ + @PreAuthorize("@ss.hasPermi('target:targetDay:remove')") + @Log(title = "指标数据底稿(日)", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(dcBusiTargetDraftDayService.deleteDcBusiTargetDraftDayDaoByIds(ids)); + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMasterDao.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMasterDao.java new file mode 100644 index 0000000..4fd5772 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillMasterDao.java @@ -0,0 +1,94 @@ +package com.lzbi.draft.domain; + +import java.util.List; +import java.util.Date; +import lombok.Data; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.lzbi.common.annotation.Excel; +import com.lzbi.module.base.BaseModuleEntity; + +/** + * 参数采集(录入)单据主对象 dc_busi_param_bill_master + * + * @author win + * @date 2023-11-28 + */ +@Data +public class DcBusiParamBillMasterDao extends BaseModuleEntity +{ + private static final long serialVersionUID = 1L; + + /** 租户号 */ + private String tenantId; + + /** 乐观锁 */ + private Long REVISION; + + /** 创建人 */ + private String createdBy; + + /** 创建时间 */ + private Date createdTime; + + /** 更新人 */ + private String updatedBy; + + /** 更新时间 */ + private Date updatedTime; + + /** 删除人 */ + private String deleteBy; + + /** 删除时间 */ + private Date deleteTime; + + /** 主键 */ + private Long id; + + /** 单据编号 */ + @Excel(name = "单据编号") + private String billNo; + + /** 采集时间 */ + @Excel(name = "采集时间") + private String billIncomeDate; + + /** 单据类型 */ + @Excel(name = "单据类型") + private String billType; + + /** 审核类型 */ + @Excel(name = "审核类型") + private String checkType; + + /** 审核状态 */ + @Excel(name = "审核状态") + private String checkStatus; + + /** 参数数据采集(录入)明细信息 */ + private List dcBusiParamBillSubDaoList; + + + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("tenantId", getTenantId()) + .append("REVISION", getREVISION()) + .append("createdBy", getCreatedBy()) + .append("createdTime", getCreatedTime()) + .append("updatedBy", getUpdatedBy()) + .append("updatedTime", getUpdatedTime()) + .append("deleteBy", getDeleteBy()) + .append("deleteTime", getDeleteTime()) + .append("id", getId()) + .append("billNo", getBillNo()) + .append("billIncomeDate", getBillIncomeDate()) + .append("billType", getBillType()) + .append("checkType", getCheckType()) + .append("checkStatus", getCheckStatus()) + .append("dcBusiParamBillSubList", getDcBusiParamBillSubDaoList()) + .toString(); + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillSubDao.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillSubDao.java new file mode 100644 index 0000000..dff38de --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiParamBillSubDao.java @@ -0,0 +1,98 @@ +package com.lzbi.draft.domain; + +import java.math.BigDecimal; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.lzbi.common.annotation.Excel; +import com.lzbi.module.base.BaseModuleEntity; + +/** + * 参数数据采集(录入)明细对象 dc_busi_param_bill_sub + * + * @author win + * @date 2023-11-28 + */ +@Data +public class DcBusiParamBillSubDao extends BaseModuleEntity +{ + private static final long serialVersionUID = 1L; + + /** 租户号 */ + private String tenantId; + + /** 乐观锁 */ + private Long REVISION; + + /** 创建人 */ + private String createdBy; + + /** 创建时间 */ + private Date createdTime; + + /** 更新人 */ + private String updatedBy; + + /** 更新时间 */ + private Date updatedTime; + + /** 删除人 */ + private String deleteBy; + + /** 删除时间 */ + private Date deleteTime; + + /** 主键 */ + private Long id; + + /** 单据编码 */ + @Excel(name = "单据编码") + private String billNo; + + /** 公司名称 */ + @Excel(name = "公司名称") + private String companyName; + + /** 公司编码 */ + @Excel(name = "公司编码") + private String companyCode; + + /** 组织机构代码 */ + @Excel(name = "组织机构代码") + private String orgCode; + + /** 组织机构名称 */ + @Excel(name = "组织机构名称") + private String orgName; + + /** 统计单元编码 */ + @Excel(name = "统计单元编码") + private String assetCode; + + /** 统计单元名称 */ + @Excel(name = "统计单元名称") + private String assetName; + + /** 所属专业 */ + @Excel(name = "所属专业") + private String fieldType; + + /** 指标名称 */ + @Excel(name = "指标名称") + private String paramName; + + /** 指标编码 */ + @Excel(name = "指标编码") + private String paramCode; + + /** 指标单位 */ + @Excel(name = "指标单位") + private String paramUint; + + /** 参数值 */ + @Excel(name = "参数值") + private BigDecimal paramValue; + +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDayDao.java b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDayDao.java new file mode 100644 index 0000000..b3b2683 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/domain/DcBusiTargetDraftDayDao.java @@ -0,0 +1,110 @@ +package com.lzbi.draft.domain; + +import java.math.BigDecimal; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.lzbi.common.annotation.Excel; +import com.lzbi.module.base.BaseModuleEntity; + +/** + * 指标数据底稿(日)对象 dc_busi_target_draft_day + * + * @author win + * @date 2023-11-28 + */ +@Data +public class DcBusiTargetDraftDayDao extends BaseModuleEntity +{ + private static final long serialVersionUID = 1L; + + /** 租户号 */ + private String tenantId; + + /** 乐观锁 */ + private Long REVISION; + + /** 创建人 */ + private String createdBy; + + /** 创建时间 */ + private Date createdTime; + + /** 更新人 */ + private String updatedBy; + + /** 更新时间 */ + private Date updatedTime; + + /** 删除人 */ + private String deleteBy; + + /** 删除时间 */ + private Date deleteTime; + + /** 主键 */ + private Long id; + + /** 公司名称 */ + @Excel(name = "公司名称") + private String companyName; + + /** 公司编码 */ + @Excel(name = "公司编码") + private String companyCode; + + /** 组织机构代码 */ + @Excel(name = "组织机构代码") + private String orgCode; + + /** 组织机构名称 */ + @Excel(name = "组织机构名称") + private String orgName; + + /** 统计单元编码 */ + @Excel(name = "统计单元编码") + private String assetCode; + + /** 统计单元名称 */ + @Excel(name = "统计单元名称") + private String assetName; + + /** 所属专业 */ + @Excel(name = "所属专业") + private String fieldType; + + /** 指标名称 */ + @Excel(name = "指标名称") + private String targetName; + + /** 指标编码 */ + @Excel(name = "指标编码") + private String targetCode; + + /** 指标单位 */ + @Excel(name = "指标单位") + private String targetUint; + + /** 年月日【yyyy-mm-dd】 */ + @Excel(name = "年月日【yyyy-mm-dd】") + private String countDate; + + /** 原值 */ + @Excel(name = "原值") + private BigDecimal valOriginal; + + /** 调整值 */ + @Excel(name = "调整值") + private BigDecimal valAdjust; + + /** 结果值 */ + @Excel(name = "结果值") + private BigDecimal valResult; + + /** 计划值 */ + @Excel(name = "计划值") + private String valPlan; + +} 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 new file mode 100644 index 0000000..c897d07 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiParamBillMasterMapper.java @@ -0,0 +1,90 @@ +package com.lzbi.draft.mapper; + +import java.util.List; + +import com.lzbi.draft.domain.DcBusiParamBillMasterDao; +import com.lzbi.draft.domain.DcBusiParamBillSubDao; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * 参数采集(录入)单据主Mapper接口 + * + * @author win + * @date 2023-11-28 + */ + +public interface DcBusiParamBillMasterMapper extends BaseMapper +{ + /** + * 查询参数采集(录入)单据主 + * + * @param id 参数采集(录入)单据主主键 + * @return 参数采集(录入)单据主 + */ + public DcBusiParamBillMasterDao selectDcBusiParamBillMasterDaoById(Long id); + + /** + * 查询参数采集(录入)单据主列表 + * + * @param dcBusiParamBillMasterDao 参数采集(录入)单据主 + * @return 参数采集(录入)单据主集合 + */ + public List selectDcBusiParamBillMasterDaoList(DcBusiParamBillMasterDao dcBusiParamBillMasterDao); + + /** + * 新增参数采集(录入)单据主 + * + * @param dcBusiParamBillMasterDao 参数采集(录入)单据主 + * @return 结果 + */ + public int insertDcBusiParamBillMasterDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao); + + /** + * 修改参数采集(录入)单据主 + * + * @param dcBusiParamBillMasterDao 参数采集(录入)单据主 + * @return 结果 + */ + public int updateDcBusiParamBillMasterDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao); + + /** + * 删除参数采集(录入)单据主 + * + * @param id 参数采集(录入)单据主主键 + * @return 结果 + */ + public int deleteDcBusiParamBillMasterDaoById(Long id); + + /** + * 批量删除参数采集(录入)单据主 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDcBusiParamBillMasterDaoByIds(Long[] ids); + + /** + * 批量删除参数数据采集(录入)明细 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDcBusiParamBillSubDaoByBillNos(Long[] ids); + + /** + * 批量新增参数数据采集(录入)明细 + * + * @param dcBusiParamBillSubDaoList 参数数据采集(录入)明细列表 + * @return 结果 + */ + public int batchDcBusiParamBillSubDao(List dcBusiParamBillSubDaoList); + + + /** + * 通过参数采集(录入)单据主主键删除参数数据采集(录入)明细信息 + * + * @param id 参数采集(录入)单据主ID + * @return 结果 + */ + public int deleteDcBusiParamBillSubDaoByBillNo(Long id); +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetDraftDayMapper.java b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetDraftDayMapper.java new file mode 100644 index 0000000..d2f12a2 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/mapper/DcBusiTargetDraftDayMapper.java @@ -0,0 +1,64 @@ +package com.lzbi.draft.mapper; + +import java.util.List; + +import com.lzbi.draft.domain.DcBusiTargetDraftDayDao; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * 指标数据底稿(日)Mapper接口 + * + * @author win + * @date 2023-11-28 + */ + +public interface DcBusiTargetDraftDayMapper extends BaseMapper +{ + /** + * 查询指标数据底稿(日) + * + * @param id 指标数据底稿(日)主键 + * @return 指标数据底稿(日) + */ + public DcBusiTargetDraftDayDao selectDcBusiTargetDraftDayDaoById(Long id); + + /** + * 查询指标数据底稿(日)列表 + * + * @param dcBusiTargetDraftDayDao 指标数据底稿(日) + * @return 指标数据底稿(日)集合 + */ + public List selectDcBusiTargetDraftDayDaoList(DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao); + + /** + * 新增指标数据底稿(日) + * + * @param dcBusiTargetDraftDayDao 指标数据底稿(日) + * @return 结果 + */ + public int insertDcBusiTargetDraftDayDao(DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao); + + /** + * 修改指标数据底稿(日) + * + * @param dcBusiTargetDraftDay 指标数据底稿(日) + * @return 结果 + */ + public int updateDcBusiTargetDraftDayDao(DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao); + + /** + * 删除指标数据底稿(日) + * + * @param id 指标数据底稿(日)主键 + * @return 结果 + */ + public int deleteDcBusiTargetDraftDayDaoById(Long id); + + /** + * 批量删除指标数据底稿(日) + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDcBusiTargetDraftDayDaoByIds(Long[] ids); +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiParamBillMasterService.java b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiParamBillMasterService.java new file mode 100644 index 0000000..ebec170 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiParamBillMasterService.java @@ -0,0 +1,130 @@ +package com.lzbi.draft.service; + +import java.util.List; + +import com.lzbi.draft.domain.DcBusiParamBillMasterDao; +import com.lzbi.draft.domain.DcBusiParamBillSubDao; +import com.lzbi.common.utils.StringUtils; +import org.springframework.stereotype.Service; +import java.util.ArrayList; +import com.lzbi.common.utils.DateUtils; +import org.springframework.transaction.annotation.Transactional; +import com.lzbi.draft.mapper.DcBusiParamBillMasterMapper; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +/** + * 参数采集(录入)单据主Service业务层处理 + * + * @author win + * @date 2023-11-28 + */ +@Service +public class DcBusiParamBillMasterService extends ServiceImpl implements IService +{ + + /** + * 查询参数采集(录入)单据主 + * + * @param id 参数采集(录入)单据主主键 + * @return 参数采集(录入)单据主 + */ + public DcBusiParamBillMasterDao selectDcBusiParamBillMasterDaoById(Long id) + { + return baseMapper.selectDcBusiParamBillMasterDaoById(id); + } + + /** + * 查询参数采集(录入)单据主列表 + * + * @param dcBusiParamBillMasterDao 参数采集(录入)单据主 + * @return 参数采集(录入)单据主 + */ + public List selectDcBusiParamBillMasterDaoList(DcBusiParamBillMasterDao dcBusiParamBillMasterDao) + { + return baseMapper.selectDcBusiParamBillMasterDaoList(dcBusiParamBillMasterDao); + } + + /** + * 新增参数采集(录入)单据主 + * + * @param dcBusiParamBillMasterDao 参数采集(录入)单据主 + * @return 结果 + */ + @Transactional + + public int insertDcBusiParamBillMasterDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao) + { + dcBusiParamBillMasterDao.setCreatedTime(DateUtils.getNowDate()); + int rows = baseMapper.insertDcBusiParamBillMasterDao(dcBusiParamBillMasterDao); + insertDcBusiParamBillSubDao(dcBusiParamBillMasterDao); + return rows; + } + + /** + * 修改参数采集(录入)单据主 + * + * @param dcBusiParamBillMasterDao 参数采集(录入)单据主 + * @return 结果 + */ + @Transactional + + public int updateDcBusiParamBillMasterDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao) + { + dcBusiParamBillMasterDao.setUpdatedTime(DateUtils.getNowDate()); + baseMapper.deleteDcBusiParamBillSubDaoByBillNo(dcBusiParamBillMasterDao.getId()); + insertDcBusiParamBillSubDao(dcBusiParamBillMasterDao); + return baseMapper.updateDcBusiParamBillMasterDao(dcBusiParamBillMasterDao); + } + + /** + * 批量删除参数采集(录入)单据主 + * + * @param ids 需要删除的参数采集(录入)单据主主键 + * @return 结果 + */ + @Transactional + + public int deleteDcBusiParamBillMasterDaoByIds(Long[] ids) + { + baseMapper.deleteDcBusiParamBillSubDaoByBillNos(ids); + return baseMapper.deleteDcBusiParamBillMasterDaoByIds(ids); + } + + /** + * 删除参数采集(录入)单据主信息 + * + * @param id 参数采集(录入)单据主主键 + * @return 结果 + */ + @Transactional + + public int deleteDcBusiParamBillMasterDaoById(Long id) + { + baseMapper.deleteDcBusiParamBillSubDaoByBillNo(id); + return baseMapper.deleteDcBusiParamBillMasterDaoById(id); + } + + /** + * 新增参数数据采集(录入)明细信息 + * + * @param dcBusiParamBillMasterDao 参数采集(录入)单据主对象 + */ + public void insertDcBusiParamBillSubDao(DcBusiParamBillMasterDao dcBusiParamBillMasterDao) + { + List dcBusiParamBillSubDaoList = dcBusiParamBillMasterDao.getDcBusiParamBillSubDaoList(); + String billNo = dcBusiParamBillMasterDao.getBillNo(); + if (StringUtils.isNotNull(dcBusiParamBillSubDaoList)) + { + List list = new ArrayList(); + for (DcBusiParamBillSubDao dcBusiParamBillSubDao : dcBusiParamBillSubDaoList) + { + dcBusiParamBillSubDao.setBillNo(billNo); + list.add(dcBusiParamBillSubDao); + } + if (list.size() > 0) + { + baseMapper.batchDcBusiParamBillSubDao(list); + } + } + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetDraftDayService.java b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetDraftDayService.java new file mode 100644 index 0000000..9eba785 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/draft/service/DcBusiTargetDraftDayService.java @@ -0,0 +1,92 @@ +package com.lzbi.draft.service; + +import java.util.List; + +import com.lzbi.draft.domain.DcBusiTargetDraftDayDao; +import com.lzbi.common.utils.DateUtils; +import org.springframework.stereotype.Service; +import com.lzbi.draft.mapper.DcBusiTargetDraftDayMapper; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +/** + * 指标数据底稿(日)Service业务层处理 + * + * @author win + * @date 2023-11-28 + */ +@Service +public class DcBusiTargetDraftDayService extends ServiceImpl implements IService +{ + + /** + * 查询指标数据底稿(日) + * + * @param id 指标数据底稿(日)主键 + * @return 指标数据底稿(日) + */ + public DcBusiTargetDraftDayDao selectDcBusiTargetDraftDayDaoById(Long id) + { + return baseMapper.selectDcBusiTargetDraftDayDaoById(id); + } + + /** + * 查询指标数据底稿(日)列表 + * + * @param dcBusiTargetDraftDayDao 指标数据底稿(日) + * @return 指标数据底稿(日) + */ + public List selectDcBusiTargetDraftDayDaoList(DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao) + { + return baseMapper.selectDcBusiTargetDraftDayDaoList(dcBusiTargetDraftDayDao); + } + + /** + * 新增指标数据底稿(日) + * + * @param dcBusiTargetDraftDayDao 指标数据底稿(日) + * @return 结果 + */ + + public int insertDcBusiTargetDraftDayDao(DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao) + { + dcBusiTargetDraftDayDao.setCreatedTime(DateUtils.getNowDate()); + return baseMapper.insertDcBusiTargetDraftDayDao(dcBusiTargetDraftDayDao); + } + + /** + * 修改指标数据底稿(日) + * + * @param dcBusiTargetDraftDayDao 指标数据底稿(日) + * @return 结果 + */ + + public int updateDcBusiTargetDraftDayDao(DcBusiTargetDraftDayDao dcBusiTargetDraftDayDao) + { + dcBusiTargetDraftDayDao.setUpdatedTime(DateUtils.getNowDate()); + return baseMapper.updateDcBusiTargetDraftDayDao(dcBusiTargetDraftDayDao); + } + + /** + * 批量删除指标数据底稿(日) + * + * @param ids 需要删除的指标数据底稿(日)主键 + * @return 结果 + */ + + public int deleteDcBusiTargetDraftDayDaoByIds(Long[] ids) + { + return baseMapper.deleteDcBusiTargetDraftDayDaoByIds(ids); + } + + /** + * 删除指标数据底稿(日)信息 + * + * @param id 指标数据底稿(日)主键 + * @return 结果 + */ + + public int deleteDcBusiTargetDraftDayDaoById(Long id) + { + return baseMapper.deleteDcBusiTargetDraftDayDaoById(id); + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/serial/controller/CodeRuleDefineController.java b/lzbi-module/src/main/java/com/lzbi/serial/controller/CodeRuleDefineController.java index a46f652..cd2e9a6 100644 --- a/lzbi-module/src/main/java/com/lzbi/serial/controller/CodeRuleDefineController.java +++ b/lzbi-module/src/main/java/com/lzbi/serial/controller/CodeRuleDefineController.java @@ -30,7 +30,7 @@ import java.util.List; * @date 2022-12-20 */ @RestController -@RequestMapping("/define") +@RequestMapping("/codeRule/define") public class CodeRuleDefineController extends BaseController { @Autowired diff --git a/lzbi-module/src/main/java/com/lzbi/serial/controller/CodeRuleSerialController.java b/lzbi-module/src/main/java/com/lzbi/serial/controller/CodeRuleSerialController.java index 5540e04..e77587e 100644 --- a/lzbi-module/src/main/java/com/lzbi/serial/controller/CodeRuleSerialController.java +++ b/lzbi-module/src/main/java/com/lzbi/serial/controller/CodeRuleSerialController.java @@ -25,7 +25,7 @@ import java.util.List; * @date 2022-12-20 */ @RestController -@RequestMapping("/serial") +@RequestMapping("/codeRule/serial") public class CodeRuleSerialController extends BaseController { @Autowired private CodeRuleSerialService codeRuleSerialService; @@ -86,18 +86,15 @@ public class CodeRuleSerialController extends BaseController { * 2023-1-16 增加动态配置能力,可以在数据库配置 格式、长度 * 原有方法作废 */ - - String billsize; - - @GetMapping("/getBillNo") - public AjaxResult getBillNo(@RequestParam long id) { + @GetMapping("/getBillNo/{node}") + public AjaxResult getBillNo(@PathVariable String node) { String billNo = ""; long serialsize = 4; //查询订单头 - CodeRuleDefine codeRuleDefine = codeRuleDefineService.selectCodeRuleDefineByDefineId(id); + CodeRuleDefine codeRuleDefine = codeRuleDefineService.selectCodeRuleDefineByDefineId(0L); if (codeRuleDefine.getDefHeader().isEmpty()) { - return AjaxResult.error("没有定义过ID为" + String.valueOf(id) + "的编号规则类型!"); + return AjaxResult.error("没有定义过ID为" + String.valueOf(0) + "的编号规则类型!"); } billNo = codeRuleDefine.getDefHeader() + DateUtils.dateTimeNow(codeRuleDefine.getDefHeaderType()); serialsize=codeRuleDefine.getSerialLength(); @@ -136,56 +133,6 @@ public class CodeRuleSerialController extends BaseController { } } - @Deprecated - public AjaxResult getBillNoOld(@RequestParam long id) { - String billNo = ""; - int serialsize = 4; - try { - serialsize = Integer.parseInt(billsize); - } catch (NumberFormatException numberFormatException) { - serialsize = 4; - } - //查询订单头 - LoginUser loginUser = SecurityUtils.getLoginUser(); - SysUser sysUser = loginUser.getUser(); - CodeRuleDefine sysBillnoDefine = codeRuleDefineService.selectCodeRuleDefineByDefineId(id); - if (sysBillnoDefine.getDefHeader().isEmpty()) { - return AjaxResult.error("没有定义过ID为" + String.valueOf(id) + "的单据类型!"); - } - billNo = sysBillnoDefine.getDefHeader() + DateUtils.dateTimeNow("YYYYMMdd"); - CodeRuleSerial codeRuleSerial = codeRuleSerialService.selectCodeRuleSerialByHeader(billNo); - if (null== codeRuleSerial || null == codeRuleSerial.getHeaderBillno()) { - codeRuleSerial=new CodeRuleSerial(); - codeRuleSerial.setHeaderBillno(billNo); - codeRuleSerial.setLockSerial(1L); - codeRuleSerial.setSerialNo(1L); - codeRuleSerial.setCreatedTime(DateUtils.getNowDate()); - codeRuleSerial.setCreatedBy(sysUser.getUserName()); - codeRuleSerial.setUpdatedBy(sysUser.getUserName()); - codeRuleSerial.setUpdatedTime(DateUtils.getNowDate()); - int ret = codeRuleSerialService.insertCodeRuleSerial(codeRuleSerial); - if (ret > 0) { - return AjaxResult.success("获取单据流水号成功",billNo + StringUtils.padl(1L, serialsize)); - } else { - return AjaxResult.error("新建单据流水号失败!"); - } - } else { - long serialnum = codeRuleSerial.getSerialNo(); - codeRuleSerial.setSerialNo(serialnum + 1L); - codeRuleSerial.setLockSerial(serialnum); - codeRuleSerial.setUpdatedBy(sysUser.getUserName()); - codeRuleSerial.setUpdatedTime(DateUtils.getNowDate()); - int ret = codeRuleSerialService.updateCodeRuleSerialLock(codeRuleSerial); - if (ret > 0) { - - return AjaxResult.success("ok",billNo + StringUtils.padl(codeRuleSerial.getSerialNo(), serialsize)); - } else { - return AjaxResult.error("获取单据流水号失败!请稍后重试"); - } - - } - - } } diff --git a/lzbi-module/src/main/java/com/lzbi/special/controller/DcBaseWorkSpecialController.java b/lzbi-module/src/main/java/com/lzbi/special/controller/DcBaseWorkSpecialController.java new file mode 100644 index 0000000..ec7b51b --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/special/controller/DcBaseWorkSpecialController.java @@ -0,0 +1,105 @@ +package com.lzbi.special.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.lzbi.special.service.DcBaseWorkSpecialService; +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.special.domain.DcBaseWorkSpecialDao; +import com.lzbi.common.utils.poi.ExcelUtil; +import com.lzbi.common.core.page.TableDataInfo; + +/** + * 生产专业管理Controller + * + * @author win + * @date 2023-11-28 + */ +@RestController +@RequestMapping("/special/specialManager") +public class DcBaseWorkSpecialController extends BaseController +{ + @Autowired + private DcBaseWorkSpecialService dcBaseWorkSpecialService; + + /** + * 查询生产专业管理列表 + */ + @PreAuthorize("@ss.hasPermi('special:specialManager:list')") + @GetMapping("/list") + public TableDataInfo list(DcBaseWorkSpecialDao dcBaseWorkSpecialDao) + { + startPage(); + List list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecialDao); + return getDataTable(list); + } + + /** + * 导出生产专业管理列表 + */ + @PreAuthorize("@ss.hasPermi('special:specialManager:export')") + @Log(title = "生产专业管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DcBaseWorkSpecialDao dcBaseWorkSpecialDao) + { + List list = dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecialDao); + ExcelUtil util = new ExcelUtil(DcBaseWorkSpecialDao.class); + util.exportExcel(response, list, "生产专业管理数据"); + } + + /** + * 获取生产专业管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('special:specialManager:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(dcBaseWorkSpecialService.selectDcBaseWorkSpecialDaoById(id)); + } + + /** + * 新增生产专业管理 + */ + @PreAuthorize("@ss.hasPermi('special:specialManager:add')") + @Log(title = "生产专业管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DcBaseWorkSpecialDao dcBaseWorkSpecialDao) + { + return toAjax(dcBaseWorkSpecialService.insertDcBaseWorkSpecialDao(dcBaseWorkSpecialDao)); + } + + /** + * 修改生产专业管理 + */ + @PreAuthorize("@ss.hasPermi('special:specialManager:edit')") + @Log(title = "生产专业管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DcBaseWorkSpecialDao dcBaseWorkSpecialDao) + { + return toAjax(dcBaseWorkSpecialService.updateDcBaseWorkSpecialDao(dcBaseWorkSpecialDao)); + } + + /** + * 删除生产专业管理 + */ + @PreAuthorize("@ss.hasPermi('special:specialManager:remove')") + @Log(title = "生产专业管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(dcBaseWorkSpecialService.deleteDcBaseWorkSpecialDaoByIds(ids)); + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/special/domain/DcBaseWorkSpecialDao.java b/lzbi-module/src/main/java/com/lzbi/special/domain/DcBaseWorkSpecialDao.java new file mode 100644 index 0000000..abb9030 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/special/domain/DcBaseWorkSpecialDao.java @@ -0,0 +1,171 @@ +package com.lzbi.special.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.lzbi.common.annotation.Excel; +import com.lzbi.module.base.BaseModuleEntity; + +/** + * 生产专业管理对象 dc_base_work_special + * + * @author win + * @date 2023-11-28 + */ +public class DcBaseWorkSpecialDao extends BaseModuleEntity +{ + private static final long serialVersionUID = 1L; + + /** 租户号 */ + private String tenantId; + + /** 乐观锁 */ + private Long REVISION; + + /** 创建人 */ + private String createdBy; + + /** 创建时间 */ + private Date createdTime; + + /** 更新人 */ + private String updatedBy; + + /** 更新时间 */ + private Date updatedTime; + + /** 删除人 */ + private String deleteBy; + + /** 删除时间 */ + private Date deleteTime; + + /** 主键 */ + private Long id; + + /** 专业编码 */ + @Excel(name = "专业编码") + private String specialCode; + + /** 专业名称 */ + @Excel(name = "专业名称") + private String specialName; + + public void setTenantId(String tenantId) + { + this.tenantId = tenantId; + } + + public String getTenantId() + { + return tenantId; + } + public void setREVISION(Long REVISION) + { + this.REVISION = REVISION; + } + + public Long getREVISION() + { + return REVISION; + } + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + public void setUpdatedBy(String updatedBy) + { + this.updatedBy = updatedBy; + } + + public String getUpdatedBy() + { + return updatedBy; + } + public void setUpdatedTime(Date updatedTime) + { + this.updatedTime = updatedTime; + } + + public Date getUpdatedTime() + { + return updatedTime; + } + public void setDeleteBy(String deleteBy) + { + this.deleteBy = deleteBy; + } + + public String getDeleteBy() + { + return deleteBy; + } + public void setDeleteTime(Date deleteTime) + { + this.deleteTime = deleteTime; + } + + public Date getDeleteTime() + { + return deleteTime; + } + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setSpecialCode(String specialCode) + { + this.specialCode = specialCode; + } + + public String getSpecialCode() + { + return specialCode; + } + public void setSpecialName(String specialName) + { + this.specialName = specialName; + } + + public String getSpecialName() + { + return specialName; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("tenantId", getTenantId()) + .append("REVISION", getREVISION()) + .append("createdBy", getCreatedBy()) + .append("createdTime", getCreatedTime()) + .append("updatedBy", getUpdatedBy()) + .append("updatedTime", getUpdatedTime()) + .append("deleteBy", getDeleteBy()) + .append("deleteTime", getDeleteTime()) + .append("id", getId()) + .append("specialCode", getSpecialCode()) + .append("specialName", getSpecialName()) + .toString(); + } +} diff --git a/lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java b/lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java new file mode 100644 index 0000000..e2421e9 --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/special/mapper/DcBaseWorkSpecialMapper.java @@ -0,0 +1,65 @@ +package com.lzbi.special.mapper; + +import java.util.List; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.lzbi.special.domain.DcBaseWorkSpecialDao; + + +/** + * 生产专业管理Mapper接口 + * + * @author win + * @date 2023-11-28 + */ + +public interface DcBaseWorkSpecialMapper extends BaseMapper +{ + /** + * 查询生产专业管理 + * + * @param id 生产专业管理主键 + * @return 生产专业管理 + */ + public DcBaseWorkSpecialDao selectDcBaseWorkSpecialDaoById(Long id); + + /** + * 查询生产专业管理列表 + * + * @param dcBaseWorkSpecialDao 生产专业管理 + * @return 生产专业管理集合 + */ + public List selectDcBaseWorkSpecialDaoList(DcBaseWorkSpecialDao dcBaseWorkSpecialDao); + + /** + * 新增生产专业管理 + * + * @param dcBaseWorkSpecialDao 生产专业管理 + * @return 结果 + */ + public int insertDcBaseWorkSpecialDao(DcBaseWorkSpecialDao dcBaseWorkSpecialDao); + + /** + * 修改生产专业管理 + * + * @param dcBaseWorkSpecialDao 生产专业管理 + * @return 结果 + */ + public int updateDcBaseWorkSpecialDao(DcBaseWorkSpecialDao dcBaseWorkSpecialDao); + + /** + * 删除生产专业管理 + * + * @param id 生产专业管理主键 + * @return 结果 + */ + public int deleteDcBaseWorkSpecialDaoById(Long id); + + /** + * 批量删除生产专业管理 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDcBaseWorkSpecialDaoByIds(Long[] ids); +} diff --git a/lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java b/lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java new file mode 100644 index 0000000..ce6b9cc --- /dev/null +++ b/lzbi-module/src/main/java/com/lzbi/special/service/DcBaseWorkSpecialService.java @@ -0,0 +1,95 @@ +package com.lzbi.special.service; + +import java.util.List; + +import com.lzbi.common.utils.DateUtils; +import org.springframework.stereotype.Service; +import com.lzbi.special.domain.DcBaseWorkSpecialDao; +import com.lzbi.special.mapper.DcBaseWorkSpecialMapper; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +/** + * 生产专业管理Service业务层处理 + * + * @author win + * @date 2023-11-28 + */ +@Service +public class DcBaseWorkSpecialService extends ServiceImpl implements IService +{ + + + /** + * 查询生产专业管理 + * + * @param id 生产专业管理主键 + * @return 生产专业管理 + */ + + public DcBaseWorkSpecialDao selectDcBaseWorkSpecialDaoById(Long id) + { + return baseMapper.selectDcBaseWorkSpecialDaoById(id); + } + + /** + * 查询生产专业管理列表 + * + * @param dcBaseWorkSpecialDao 生产专业管理 + * @return 生产专业管理 + */ + + public List selectDcBaseWorkSpecialDaoList(DcBaseWorkSpecialDao dcBaseWorkSpecialDao) + { + return baseMapper.selectDcBaseWorkSpecialDaoList(dcBaseWorkSpecialDao); + } + + /** + * 新增生产专业管理 + * + * @param dcBaseWorkSpecialDao 生产专业管理 + * @return 结果 + */ + + public int insertDcBaseWorkSpecialDao(DcBaseWorkSpecialDao dcBaseWorkSpecialDao) + { + dcBaseWorkSpecialDao.setCreatedTime(DateUtils.getNowDate()); + return baseMapper.insertDcBaseWorkSpecialDao(dcBaseWorkSpecialDao); + } + + /** + * 修改生产专业管理 + * + * @param dcBaseWorkSpecialDao 生产专业管理 + * @return 结果 + */ + + public int updateDcBaseWorkSpecialDao(DcBaseWorkSpecialDao dcBaseWorkSpecialDao) + { + dcBaseWorkSpecialDao.setUpdatedTime(DateUtils.getNowDate()); + return baseMapper.updateDcBaseWorkSpecialDao(dcBaseWorkSpecialDao); + } + + /** + * 批量删除生产专业管理 + * + * @param ids 需要删除的生产专业管理主键 + * @return 结果 + */ + + public int deleteDcBaseWorkSpecialDaoByIds(Long[] ids) + { + return baseMapper.deleteDcBaseWorkSpecialDaoByIds(ids); + } + + /** + * 删除生产专业管理信息 + * + * @param id 生产专业管理主键 + * @return 结果 + */ + + public int deleteDcBaseWorkSpecialDaoById(Long id) + { + return baseMapper.deleteDcBaseWorkSpecialDaoById(id); + } +} diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml new file mode 100644 index 0000000..d81bbfb --- /dev/null +++ b/lzbi-module/src/main/resources/mapper/asset/DcBaseWorkSpecialMapper.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + select TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, special_code, special_name from dc_base_work_special + + + + + + + + insert into dc_base_work_special + + TENANT_ID, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME, + DELETE_BY, + DELETE_TIME, + special_code, + special_name, + + + #{tenantId}, + #{REVISION}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{deleteBy}, + #{deleteTime}, + #{specialCode}, + #{specialName}, + + + + + update dc_base_work_special + + TENANT_ID = #{tenantId}, + REVISION = #{REVISION}, + CREATED_BY = #{createdBy}, + CREATED_TIME = #{createdTime}, + UPDATED_BY = #{updatedBy}, + UPDATED_TIME = #{updatedTime}, + DELETE_BY = #{deleteBy}, + DELETE_TIME = #{deleteTime}, + special_code = #{specialCode}, + special_name = #{specialName}, + + where id = #{id} + + + + delete from dc_base_work_special where id = #{id} + + + + delete from dc_base_work_special where id in + + #{id} + + + \ No newline at end of file diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillMasterMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillMasterMapper.xml new file mode 100644 index 0000000..96685f9 --- /dev/null +++ b/lzbi-module/src/main/resources/mapper/asset/DcBusiParamBillMasterMapper.xml @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, bill_no, bill_income_date, bill_type, check_type, check_status from dc_busi_param_bill_master + + + + + + + + insert into dc_busi_param_bill_master + + TENANT_ID, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME, + DELETE_BY, + DELETE_TIME, + bill_no, + bill_income_date, + bill_type, + check_type, + check_status, + + + #{tenantId}, + #{REVISION}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{deleteBy}, + #{deleteTime}, + #{billNo}, + #{billIncomeDate}, + #{billType}, + #{checkType}, + #{checkStatus}, + + + + + 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_no = #{billNo}, + bill_income_date = #{billIncomeDate}, + bill_type = #{billType}, + check_type = #{checkType}, + check_status = #{checkStatus}, + + where id = #{id} + + + + delete from dc_busi_param_bill_master where id = #{id} + + + + delete from dc_busi_param_bill_master where id in + + #{id} + + + + + delete from dc_busi_param_bill_sub where bill_no in + + #{billNo} + + + + + delete from dc_busi_param_bill_sub where bill_no = #{billNo} + + + + insert into dc_busi_param_bill_sub( TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, bill_no, company_name, company_code, org_code, org_name, asset_code, asset_name, field_type, param_name, param_code, param_uint, param_value) values + + ( #{item.tenantId}, #{item.REVISION}, #{item.createdBy}, #{item.createdTime}, #{item.updatedBy}, #{item.updatedTime}, #{item.deleteBy}, #{item.deleteTime}, #{item.id}, #{item.billNo}, #{item.companyName}, #{item.companyCode}, #{item.orgCode}, #{item.orgName}, #{item.assetCode}, #{item.assetName}, #{item.fieldType}, #{item.paramName}, #{item.paramCode}, #{item.paramUint}, #{item.paramValue}) + + + \ No newline at end of file diff --git a/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftDayMapper.xml b/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftDayMapper.xml new file mode 100644 index 0000000..7874eb5 --- /dev/null +++ b/lzbi-module/src/main/resources/mapper/asset/DcBusiTargetDraftDayMapper.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select TENANT_ID, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, DELETE_BY, DELETE_TIME, id, company_name, company_code, org_code, org_name, asset_code, asset_name, field_type, target_name, target_code, target_uint, count_date, val_original, val_adjust, val_result, val_plan from dc_busi_target_draft_day + + + + + + + + insert into dc_busi_target_draft_day + + TENANT_ID, + REVISION, + CREATED_BY, + CREATED_TIME, + UPDATED_BY, + UPDATED_TIME, + DELETE_BY, + DELETE_TIME, + company_name, + company_code, + org_code, + org_name, + asset_code, + asset_name, + field_type, + target_name, + target_code, + target_uint, + count_date, + val_original, + val_adjust, + val_result, + val_plan, + + + #{tenantId}, + #{REVISION}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{deleteBy}, + #{deleteTime}, + #{companyName}, + #{companyCode}, + #{orgCode}, + #{orgName}, + #{assetCode}, + #{assetName}, + #{fieldType}, + #{targetName}, + #{targetCode}, + #{targetUint}, + #{countDate}, + #{valOriginal}, + #{valAdjust}, + #{valResult}, + #{valPlan}, + + + + + update dc_busi_target_draft_day + + TENANT_ID = #{tenantId}, + REVISION = #{REVISION}, + CREATED_BY = #{createdBy}, + CREATED_TIME = #{createdTime}, + UPDATED_BY = #{updatedBy}, + UPDATED_TIME = #{updatedTime}, + DELETE_BY = #{deleteBy}, + DELETE_TIME = #{deleteTime}, + company_name = #{companyName}, + company_code = #{companyCode}, + org_code = #{orgCode}, + org_name = #{orgName}, + asset_code = #{assetCode}, + asset_name = #{assetName}, + field_type = #{fieldType}, + target_name = #{targetName}, + target_code = #{targetCode}, + target_uint = #{targetUint}, + count_date = #{countDate}, + val_original = #{valOriginal}, + val_adjust = #{valAdjust}, + val_result = #{valResult}, + val_plan = #{valPlan}, + + where id = #{id} + + + + delete from dc_busi_target_draft_day where id = #{id} + + + + delete from dc_busi_target_draft_day where id in + + #{id} + + + \ No newline at end of file