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)
@PostMapping
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));
}
@ -89,6 +93,8 @@ public class DcBaseAssetInfoController extends BaseController {
@Log(title = "资产信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcBaseAssetInfo dcBaseAssetInfo) {
dcBaseAssetInfo.setUpdatedBy(getUsername());
dcBaseAssetInfo.setUpdatedTime(DateUtils.getNowDate());
return toAjax(dcBaseAssetInfoService.updateDcBaseAssetInfo(dcBaseAssetInfo));
}
@ -122,10 +128,9 @@ public class DcBaseAssetInfoController extends BaseController {
beanObject.remove("id");
DcBaseAssetInfo dcBaseAssetInfo = JSON.toJavaObject(beanObject, DcBaseAssetInfo.class);
dcBaseAssetInfo.setCreatedTime(DateUtils.getNowDate());
dcBaseAssetInfo.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetInfo.setDeptId(getDeptId());
dcBaseAssetInfo.setUserId(getUserId());
dcBaseAssetInfo.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetInfo.setCreatedTime(DateUtils.getNowDate());
beanList.add(dcBaseAssetInfo);
}
} 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
public AjaxResult add(@Valid @RequestBody DcBaseParamModel dcBaseParamModel) {
//BeanValidators.validateWithException(validator, dcBaseParamModel);
dcBaseParamModel.setCreatedBy(getUsername());
dcBaseParamModel.setCreatedTime(DateUtils.getNowDate());
dcBaseParamModel.setTenantId("0");
dcBaseParamModel.setUpdatedBy(getUsername());
dcBaseParamModel.setUpdatedTime(DateUtils.getNowDate());
dcBaseParamModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseParamModel.setDeptId(getDeptId());
dcBaseParamModel.setUserId(getUserId());
return toAjax(dcBaseParamModelService.insertByVo(dcBaseParamModel));
}
/**
@ -154,10 +153,9 @@ public class DcBaseParamModelController extends BaseController
beanObject.remove("id");
DcBaseParamModel dcBaseParamModel = JSON.toJavaObject(beanObject, DcBaseParamModel.class);
dcBaseParamModel.setCreatedTime(DateUtils.getNowDate());
dcBaseParamModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseParamModel.setDeptId(getDeptId());
dcBaseParamModel.setUserId(getUserId());
dcBaseParamModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseParamModel.setCreatedTime(DateUtils.getNowDate());
dcBaseParamModelList.add(dcBaseParamModel);
}
} 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")
public class DcBaseParamModel extends BaseModuleEntity{
/** 主键 */
@ApiModelProperty(name = "主键",notes = "")
private Long id ;
/** 参数模型编码 */
@ApiModelProperty(name = "参数模型编码",notes = "")
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
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));
}
@ -94,6 +98,8 @@ public class DcBaseAssetTargetController extends BaseController
@PutMapping
public AjaxResult edit(@RequestBody DcBaseAssetTarget dcBaseAssetTarget)
{
dcBaseAssetTarget.setUpdatedTime(DateUtils.getNowDate());
dcBaseAssetTarget.setUpdatedBy(String.valueOf(getUserId()));
return toAjax(dcBaseAssetTargetService.updateDcBaseAssetTarget(dcBaseAssetTarget));
}
@ -140,10 +146,9 @@ public class DcBaseAssetTargetController extends BaseController
beanObject.remove("id");
DcBaseAssetTarget dcBaseAssetTarget = JSON.toJavaObject(beanObject, DcBaseAssetTarget.class);
dcBaseAssetTarget.setCreatedTime(DateUtils.getNowDate());
dcBaseAssetTarget.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetTarget.setDeptId(getDeptId());
dcBaseAssetTarget.setUserId(getUserId());
dcBaseAssetTarget.setCreatedBy(String.valueOf(getUserId()));
dcBaseAssetTarget.setCreatedTime(DateUtils.getNowDate());
beanList.add(dcBaseAssetTarget);
}
} 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')")
@Log(title = "指标模版配置", businessType = BusinessType.INSERT)
@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')")
@Log(title = "指标模版配置", businessType = BusinessType.UPDATE)
@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");
DcBaseTargetModel dcBaseTargetModel = JSON.toJavaObject(beanObject, DcBaseTargetModel.class);
dcBaseTargetModel.setCreatedTime(DateUtils.getNowDate());
dcBaseTargetModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseTargetModel.setDeptId(getDeptId());
dcBaseTargetModel.setUserId(getUserId());
dcBaseTargetModel.setCreatedBy(String.valueOf(getUserId()));
dcBaseTargetModel.setCreatedTime(DateUtils.getNowDate());
beanList.add(dcBaseTargetModel);
}
} 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="deptId != null ">and dept_id = #{deptId}</if>
</where>
ORDER BY COALESCE(updated_time, created_time) DESC
</select>
<select id="selectDcBaseAssetInfoById" parameterType="Long" resultMap="DcBaseAssetInfoResult">
<include refid="selectDcBaseAssetInfoVo"/>
@ -85,7 +86,7 @@
insert into dc_base_asset_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<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="createdTime != null">CREATED_TIME,</if>
<if test="updatedBy != null">UPDATED_BY,</if>
@ -104,7 +105,7 @@
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<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="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if>
@ -127,7 +128,7 @@
update dc_base_asset_info
<trim prefix="SET" suffixOverrides=",">
<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="createdTime != null">CREATED_TIME = #{createdTime},</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>
</where>
ORDER BY COALESCE(updated_time, created_time) DESC
</select>
<insert id="insertByVo" parameterType="com.lzbi.asset.domain.DcBaseParamModel">
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="userId != null "> and user_id = #{userId}</if>
</where>
ORDER BY COALESCE(updated_time, created_time) DESC
</select>
<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="targetModelLevel != null "> and target_model_level = #{targetModelLevel}</if>
</where>
ORDER BY COALESCE(updated_time, created_time) DESC
</select>
<select id="selectDcBaseTargetModelById" parameterType="Long" resultMap="DcBaseTargetModelResult">

Loading…
Cancel
Save