Browse Source

最新问题修复代码

develop
ljlong_2630 11 months ago
parent
commit
bd09d7dc3a
  1. 9
      lzbi-module/src/main/java/com/lzbi/asset/controller/DcBaseAssetInfoController.java
  2. 10
      lzbi-module/src/main/java/com/lzbi/asset/controller/DcBaseParamModelController.java
  3. 3
      lzbi-module/src/main/java/com/lzbi/asset/domain/DcBaseParamModel.java
  4. 9
      lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseAssetTargetController.java
  5. 17
      lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseTargetModelController.java
  6. 7
      lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml
  7. 1
      lzbi-module/src/main/resources/mapper/asset/DcBaseParamModelMapper.xml
  8. 1
      lzbi-module/src/main/resources/mapper/targetFolder/DcBaseAssetTargetMapper.xml
  9. 1
      lzbi-module/src/main/resources/mapper/targetFolder/DcBaseTargetModelMapper.xml

9
lzbi-module/src/main/java/com/lzbi/asset/controller/DcBaseAssetInfoController.java

@ -79,6 +79,10 @@ public class DcBaseAssetInfoController extends BaseController {
@Log(title = "资产信息", businessType = BusinessType.INSERT) @Log(title = "资产信息", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody DcBaseAssetInfo dcBaseAssetInfo) { public AjaxResult add(@RequestBody DcBaseAssetInfo dcBaseAssetInfo) {
dcBaseAssetInfo.setCreatedTime(DateUtils.getNowDate());
dcBaseAssetInfo.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetInfo.setDeptId(getDeptId());
dcBaseAssetInfo.setUserId(getUserId());
return toAjax(dcBaseAssetInfoService.insertDcBaseAssetInfo(dcBaseAssetInfo)); return toAjax(dcBaseAssetInfoService.insertDcBaseAssetInfo(dcBaseAssetInfo));
} }
@ -89,6 +93,8 @@ public class DcBaseAssetInfoController extends BaseController {
@Log(title = "资产信息", businessType = BusinessType.UPDATE) @Log(title = "资产信息", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DcBaseAssetInfo dcBaseAssetInfo) { public AjaxResult edit(@RequestBody DcBaseAssetInfo dcBaseAssetInfo) {
dcBaseAssetInfo.setUpdatedBy(getUsername());
dcBaseAssetInfo.setUpdatedTime(DateUtils.getNowDate());
return toAjax(dcBaseAssetInfoService.updateDcBaseAssetInfo(dcBaseAssetInfo)); return toAjax(dcBaseAssetInfoService.updateDcBaseAssetInfo(dcBaseAssetInfo));
} }
@ -122,10 +128,9 @@ public class DcBaseAssetInfoController extends BaseController {
beanObject.remove("id"); beanObject.remove("id");
DcBaseAssetInfo dcBaseAssetInfo = JSON.toJavaObject(beanObject, DcBaseAssetInfo.class); DcBaseAssetInfo dcBaseAssetInfo = JSON.toJavaObject(beanObject, DcBaseAssetInfo.class);
dcBaseAssetInfo.setCreatedTime(DateUtils.getNowDate()); dcBaseAssetInfo.setCreatedTime(DateUtils.getNowDate());
dcBaseAssetInfo.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetInfo.setDeptId(getDeptId()); dcBaseAssetInfo.setDeptId(getDeptId());
dcBaseAssetInfo.setUserId(getUserId()); dcBaseAssetInfo.setUserId(getUserId());
dcBaseAssetInfo.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetInfo.setCreatedTime(DateUtils.getNowDate());
beanList.add(dcBaseAssetInfo); beanList.add(dcBaseAssetInfo);
} }
} catch (Exception e) { } catch (Exception e) {

10
lzbi-module/src/main/java/com/lzbi/asset/controller/DcBaseParamModelController.java

@ -72,11 +72,10 @@ public class DcBaseParamModelController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@Valid @RequestBody DcBaseParamModel dcBaseParamModel) { public AjaxResult add(@Valid @RequestBody DcBaseParamModel dcBaseParamModel) {
//BeanValidators.validateWithException(validator, dcBaseParamModel); //BeanValidators.validateWithException(validator, dcBaseParamModel);
dcBaseParamModel.setCreatedBy(getUsername());
dcBaseParamModel.setCreatedTime(DateUtils.getNowDate()); dcBaseParamModel.setCreatedTime(DateUtils.getNowDate());
dcBaseParamModel.setTenantId("0"); dcBaseParamModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseParamModel.setUpdatedBy(getUsername()); dcBaseParamModel.setDeptId(getDeptId());
dcBaseParamModel.setUpdatedTime(DateUtils.getNowDate()); dcBaseParamModel.setUserId(getUserId());
return toAjax(dcBaseParamModelService.insertByVo(dcBaseParamModel)); return toAjax(dcBaseParamModelService.insertByVo(dcBaseParamModel));
} }
/** /**
@ -154,10 +153,9 @@ public class DcBaseParamModelController extends BaseController
beanObject.remove("id"); beanObject.remove("id");
DcBaseParamModel dcBaseParamModel = JSON.toJavaObject(beanObject, DcBaseParamModel.class); DcBaseParamModel dcBaseParamModel = JSON.toJavaObject(beanObject, DcBaseParamModel.class);
dcBaseParamModel.setCreatedTime(DateUtils.getNowDate()); dcBaseParamModel.setCreatedTime(DateUtils.getNowDate());
dcBaseParamModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseParamModel.setDeptId(getDeptId()); dcBaseParamModel.setDeptId(getDeptId());
dcBaseParamModel.setUserId(getUserId()); dcBaseParamModel.setUserId(getUserId());
dcBaseParamModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseParamModel.setCreatedTime(DateUtils.getNowDate());
dcBaseParamModelList.add(dcBaseParamModel); dcBaseParamModelList.add(dcBaseParamModel);
} }
} catch (Exception e) { } catch (Exception e) {

3
lzbi-module/src/main/java/com/lzbi/asset/domain/DcBaseParamModel.java

@ -22,9 +22,6 @@ import com.lzbi.module.base.BaseModuleEntity;
@TableName("dc_base_param_model") @TableName("dc_base_param_model")
public class DcBaseParamModel extends BaseModuleEntity{ public class DcBaseParamModel extends BaseModuleEntity{
/** 主键 */
@ApiModelProperty(name = "主键",notes = "")
private Long id ;
/** 参数模型编码 */ /** 参数模型编码 */
@ApiModelProperty(name = "参数模型编码",notes = "") @ApiModelProperty(name = "参数模型编码",notes = "")
private String paramModelCode ; private String paramModelCode ;

9
lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseAssetTargetController.java

@ -83,6 +83,10 @@ public class DcBaseAssetTargetController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody DcBaseAssetTarget dcBaseAssetTarget) public AjaxResult add(@RequestBody DcBaseAssetTarget dcBaseAssetTarget)
{ {
dcBaseAssetTarget.setCreatedTime(DateUtils.getNowDate());
dcBaseAssetTarget.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetTarget.setDeptId(getDeptId());
dcBaseAssetTarget.setUserId(getUserId());
return toAjax(dcBaseAssetTargetService.insertDcBaseAssetTarget(dcBaseAssetTarget)); return toAjax(dcBaseAssetTargetService.insertDcBaseAssetTarget(dcBaseAssetTarget));
} }
@ -94,6 +98,8 @@ public class DcBaseAssetTargetController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DcBaseAssetTarget dcBaseAssetTarget) public AjaxResult edit(@RequestBody DcBaseAssetTarget dcBaseAssetTarget)
{ {
dcBaseAssetTarget.setUpdatedTime(DateUtils.getNowDate());
dcBaseAssetTarget.setUpdatedBy(String.valueOf(getUserId()));
return toAjax(dcBaseAssetTargetService.updateDcBaseAssetTarget(dcBaseAssetTarget)); return toAjax(dcBaseAssetTargetService.updateDcBaseAssetTarget(dcBaseAssetTarget));
} }
@ -140,10 +146,9 @@ public class DcBaseAssetTargetController extends BaseController
beanObject.remove("id"); beanObject.remove("id");
DcBaseAssetTarget dcBaseAssetTarget = JSON.toJavaObject(beanObject, DcBaseAssetTarget.class); DcBaseAssetTarget dcBaseAssetTarget = JSON.toJavaObject(beanObject, DcBaseAssetTarget.class);
dcBaseAssetTarget.setCreatedTime(DateUtils.getNowDate()); dcBaseAssetTarget.setCreatedTime(DateUtils.getNowDate());
dcBaseAssetTarget.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetTarget.setDeptId(getDeptId()); dcBaseAssetTarget.setDeptId(getDeptId());
dcBaseAssetTarget.setUserId(getUserId()); dcBaseAssetTarget.setUserId(getUserId());
dcBaseAssetTarget.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetTarget.setCreatedTime(DateUtils.getNowDate());
beanList.add(dcBaseAssetTarget); beanList.add(dcBaseAssetTarget);
} }
} catch (Exception e) { } catch (Exception e) {

17
lzbi-module/src/main/java/com/lzbi/targetFolder/controller/DcBaseTargetModelController.java

@ -101,9 +101,13 @@ public class DcBaseTargetModelController extends BaseController
@PreAuthorize("@ss.hasPermi('target:targetModel:add')") @PreAuthorize("@ss.hasPermi('target:targetModel:add')")
@Log(title = "指标模版配置", businessType = BusinessType.INSERT) @Log(title = "指标模版配置", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody DcBaseTargetModel DcBaseTargetModel) public AjaxResult add(@RequestBody DcBaseTargetModel dcBaseTargetModel)
{ {
return toAjax(dcBaseTargetModelService.insertDcBaseTargetModel(DcBaseTargetModel)); dcBaseTargetModel.setCreatedTime(DateUtils.getNowDate());
dcBaseTargetModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseTargetModel.setDeptId(getDeptId());
dcBaseTargetModel.setUserId(getUserId());
return toAjax(dcBaseTargetModelService.insertDcBaseTargetModel(dcBaseTargetModel));
} }
/** /**
@ -117,9 +121,11 @@ public class DcBaseTargetModelController extends BaseController
@PreAuthorize("@ss.hasPermi('target:targetModel:edit')") @PreAuthorize("@ss.hasPermi('target:targetModel:edit')")
@Log(title = "指标模版配置", businessType = BusinessType.UPDATE) @Log(title = "指标模版配置", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody DcBaseTargetModel DcBaseTargetModel) public AjaxResult edit(@RequestBody DcBaseTargetModel dcBaseTargetModel)
{ {
return toAjax(dcBaseTargetModelService.updateDcBaseTargetModel(DcBaseTargetModel)); dcBaseTargetModel.setUpdatedTime(DateUtils.getNowDate());
dcBaseTargetModel.setUpdatedBy(String.valueOf(getUserId()));
return toAjax(dcBaseTargetModelService.updateDcBaseTargetModel(dcBaseTargetModel));
} }
/** /**
@ -157,10 +163,9 @@ public class DcBaseTargetModelController extends BaseController
beanObject.remove("id"); beanObject.remove("id");
DcBaseTargetModel dcBaseTargetModel = JSON.toJavaObject(beanObject, DcBaseTargetModel.class); DcBaseTargetModel dcBaseTargetModel = JSON.toJavaObject(beanObject, DcBaseTargetModel.class);
dcBaseTargetModel.setCreatedTime(DateUtils.getNowDate()); dcBaseTargetModel.setCreatedTime(DateUtils.getNowDate());
dcBaseTargetModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseTargetModel.setDeptId(getDeptId()); dcBaseTargetModel.setDeptId(getDeptId());
dcBaseTargetModel.setUserId(getUserId()); dcBaseTargetModel.setUserId(getUserId());
dcBaseTargetModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseTargetModel.setCreatedTime(DateUtils.getNowDate());
beanList.add(dcBaseTargetModel); beanList.add(dcBaseTargetModel);
} }
} catch (Exception e) { } catch (Exception e) {

7
lzbi-module/src/main/resources/mapper/asset/DcBaseAssetInfoMapper.xml

@ -65,6 +65,7 @@
<if test="comanyId != null ">and comany_id = #{comanyId}</if> <if test="comanyId != null ">and comany_id = #{comanyId}</if>
<if test="deptId != null ">and dept_id = #{deptId}</if> <if test="deptId != null ">and dept_id = #{deptId}</if>
</where> </where>
ORDER BY COALESCE(updated_time, created_time) DESC
</select> </select>
<select id="selectDcBaseAssetInfoById" parameterType="Long" resultMap="DcBaseAssetInfoResult"> <select id="selectDcBaseAssetInfoById" parameterType="Long" resultMap="DcBaseAssetInfoResult">
<include refid="selectDcBaseAssetInfoVo"/> <include refid="selectDcBaseAssetInfoVo"/>
@ -85,7 +86,7 @@
insert into dc_base_asset_info insert into dc_base_asset_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tenantId != null">TENANT_ID,</if> <if test="tenantId != null">TENANT_ID,</if>
<if test="REVISION != null">REVISION,</if> <if test="revision != null">REVISION,</if>
<if test="createdBy != null">CREATED_BY,</if> <if test="createdBy != null">CREATED_BY,</if>
<if test="createdTime != null">CREATED_TIME,</if> <if test="createdTime != null">CREATED_TIME,</if>
<if test="updatedBy != null">UPDATED_BY,</if> <if test="updatedBy != null">UPDATED_BY,</if>
@ -104,7 +105,7 @@
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tenantId != null">#{tenantId},</if> <if test="tenantId != null">#{tenantId},</if>
<if test="REVISION != null">#{REVISION},</if> <if test="revision != null">#{revision},</if>
<if test="createdBy != null">#{createdBy},</if> <if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if> <if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if> <if test="updatedBy != null">#{updatedBy},</if>
@ -127,7 +128,7 @@
update dc_base_asset_info update dc_base_asset_info
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="tenantId != null">TENANT_ID = #{tenantId},</if> <if test="tenantId != null">TENANT_ID = #{tenantId},</if>
<if test="REVISION != null">REVISION = #{REVISION},</if> <if test="revision != null">REVISION = #{revision},</if>
<if test="createdBy != null">CREATED_BY = #{createdBy},</if> <if test="createdBy != null">CREATED_BY = #{createdBy},</if>
<if test="createdTime != null">CREATED_TIME = #{createdTime},</if> <if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
<if test="updatedBy != null">UPDATED_BY = #{updatedBy},</if> <if test="updatedBy != null">UPDATED_BY = #{updatedBy},</if>

1
lzbi-module/src/main/resources/mapper/asset/DcBaseParamModelMapper.xml

@ -74,6 +74,7 @@
<if test="flagStatus != null and flagStatus != ''"> and flag_status = #{flagStatus}</if> <if test="flagStatus != null and flagStatus != ''"> and flag_status = #{flagStatus}</if>
</where> </where>
ORDER BY COALESCE(updated_time, created_time) DESC
</select> </select>
<insert id="insertByVo" parameterType="com.lzbi.asset.domain.DcBaseParamModel"> <insert id="insertByVo" parameterType="com.lzbi.asset.domain.DcBaseParamModel">
insert into dc_base_param_model insert into dc_base_param_model

1
lzbi-module/src/main/resources/mapper/targetFolder/DcBaseAssetTargetMapper.xml

@ -62,6 +62,7 @@
<if test="deptId != null "> and dept_id = #{deptId}</if> <if test="deptId != null "> and dept_id = #{deptId}</if>
<if test="userId != null "> and user_id = #{userId}</if> <if test="userId != null "> and user_id = #{userId}</if>
</where> </where>
ORDER BY COALESCE(updated_time, created_time) DESC
</select> </select>
<select id="selectDcBaseAssetTargetById" parameterType="Long" resultMap="DcBaseAssetTargetResult"> <select id="selectDcBaseAssetTargetById" parameterType="Long" resultMap="DcBaseAssetTargetResult">

1
lzbi-module/src/main/resources/mapper/targetFolder/DcBaseTargetModelMapper.xml

@ -36,6 +36,7 @@
<if test="targetModelField != null and targetModelField != ''"> and target_model_field = #{targetModelField}</if> <if test="targetModelField != null and targetModelField != ''"> and target_model_field = #{targetModelField}</if>
<if test="targetModelLevel != null "> and target_model_level = #{targetModelLevel}</if> <if test="targetModelLevel != null "> and target_model_level = #{targetModelLevel}</if>
</where> </where>
ORDER BY COALESCE(updated_time, created_time) DESC
</select> </select>
<select id="selectDcBaseTargetModelById" parameterType="Long" resultMap="DcBaseTargetModelResult"> <select id="selectDcBaseTargetModelById" parameterType="Long" resultMap="DcBaseTargetModelResult">

Loading…
Cancel
Save