设备管理-创建/更新字段BUG

highway
wws 1 year ago
parent 25b5fbe636
commit 433a307c75

@ -68,23 +68,23 @@ public class EquCheckItem extends BaseEntity {
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdTime;
private Date createTime;
/** 创建人 */
@Excel(name = "创建人")
private String createdBy;
private String createBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedTime;
private Date updateTime;
/** 更新人 */
@Excel(name = "更新人")
private String updatedBy;
private String updateBy;
// 创建日期范围list
private List<Date> createdTimeArray;
private List<Date> createTimeArray;
// 更新日期范围list
private List<Date> updateTimeArray;
@ -141,12 +141,12 @@ public class EquCheckItem extends BaseEntity {
this.createTimeEnd = createTimeEnd;
}
public List<Date> getCreatedTimeArray() {
return createdTimeArray;
public List<Date> getCreateTimeArray() {
return createTimeArray;
}
public void setCreatedTimeArray(List<Date> createdTimeArray) {
this.createdTimeArray = createdTimeArray;
public void setCreateTimeArray(List<Date> createTimeArray) {
this.createTimeArray = createTimeArray;
}
public void setItemId(String itemId) {
@ -233,33 +233,33 @@ public class EquCheckItem extends BaseEntity {
public String getDelFlag() {
return delFlag;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getCreatedTime() {
return createdTime;
public Date getCreateTime() {
return createTime;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getCreatedBy() {
return createdBy;
public String getCreateBy() {
return createBy;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Date getUpdatedTime() {
return updatedTime;
public Date getUpdateTime() {
return updateTime;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public String getUpdatedBy() {
return updatedBy;
public String getUpdateBy() {
return updateBy;
}
@Override
@ -277,11 +277,11 @@ public class EquCheckItem extends BaseEntity {
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("delFlag", getDelFlag())
.append("createdTime", getCreatedTime())
.append("createdBy", getCreatedBy())
.append("updatedTime", getUpdatedTime())
.append("updatedBy", getUpdatedBy())
.append("createdTimeArray",getCreatedTimeArray())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("updateTime", getUpdateTime())
.append("updateBy", getUpdateBy())
.append("createTimeArray",getCreateTimeArray())
.toString();
}
}

@ -66,20 +66,20 @@ public class EquCheckItemDetail extends BaseEntity {
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdTime;
private Date createTime;
/** 创建人 */
@Excel(name = "创建人")
private String createdBy;
private String createBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedTime;
private Date updateTime;
/** 更新人 */
@Excel(name = "更新人")
private String updatedBy;
private String updateBy;
/** 详情编码 */
@Excel(name = "详情编码")
@ -177,33 +177,33 @@ public class EquCheckItemDetail extends BaseEntity {
public String getDelFlag() {
return delFlag;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getCreatedTime() {
return createdTime;
public Date getCreateTime() {
return createTime;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getCreatedBy() {
return createdBy;
public String getCreateBy() {
return createBy;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Date getUpdatedTime() {
return updatedTime;
public Date getUpdateTime() {
return updateTime;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public String getUpdatedBy() {
return updatedBy;
public String getUpdateBy() {
return updateBy;
}
@Override
@ -221,10 +221,10 @@ public class EquCheckItemDetail extends BaseEntity {
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("delFlag", getDelFlag())
.append("createdTime", getCreatedTime())
.append("createdBy", getCreatedBy())
.append("updatedTime", getUpdatedTime())
.append("updatedBy", getUpdatedBy())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("updateTime", getUpdateTime())
.append("updateBy", getUpdateBy())
.append("detailCode", getDetailCode())
.toString();
}

@ -52,21 +52,21 @@ public class EquItemEquipment extends BaseEntity {
/** 创建人 */
@Excel(name = "创建人")
private String createdBy;
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdTime;
private Date createTime;
/** 更新人 */
@Excel(name = "更新人")
private String updatedBy;
private String updateBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updatedTime;
private Date updateTime;
public void setId(String id) {
this.id = id;
@ -131,33 +131,33 @@ public class EquItemEquipment extends BaseEntity {
public String getDelFlag() {
return delFlag;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public String getCreatedBy() {
return createdBy;
public String getCreateBy() {
return createBy;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getCreatedTime() {
return createdTime;
public Date getCreateTime() {
return createTime;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public String getUpdatedBy() {
return updatedBy;
public String getUpdateBy() {
return updateBy;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Date getUpdatedTime() {
return updatedTime;
public Date getUpdateTime() {
return updateTime;
}
@Override
@ -172,10 +172,10 @@ public class EquItemEquipment extends BaseEntity {
.append("attr2", getAttr2())
.append("attr3", getAttr3())
.append("delFlag", getDelFlag())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updatedBy", getUpdatedBy())
.append("updatedTime", getUpdatedTime())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

@ -32,17 +32,17 @@ public class EquCheckItemDTO {
/** 删除标识 */
private String delFlag ;
/** 创建时间 */
private Date createdTime ;
private Date createTime ;
/** 创建人 */
private String createdBy ;
private String createBy ;
/** 更新时间 */
private Date updatedTime ;
private Date updateTime ;
/** 更新人 */
private String updatedBy ;
private String updateBy ;
// 标准列表
private List<EquCheckItemDetail> formStandard;
// 创建日期范围list
private List<Date> createdTimeArray;
private List<Date> createTimeArray;
// 更新日期范围list
private List<Date> updateTimeArray;
@ -70,12 +70,12 @@ public class EquCheckItemDTO {
this.equipmentCodeList = equipmentCodeList;
}
public List<Date> getCreatedTimeArray() {
return createdTimeArray;
public List<Date> getCreateTimeArray() {
return createTimeArray;
}
public void setCreatedTimeArray(List<Date> createdTimeArray) {
this.createdTimeArray = createdTimeArray;
public void setCreateTimeArray(List<Date> createTimeArray) {
this.createTimeArray = createTimeArray;
}
public List<Date> getUpdateTimeArray() {
@ -214,36 +214,36 @@ public class EquCheckItemDTO {
this.delFlag = delFlag;
}
public Date getCreatedTime() {
return createdTime;
public Date getCreateTime() {
return createTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreatedBy() {
return createdBy;
public String getCreateBy() {
return createBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getUpdatedTime() {
return updatedTime;
public Date getUpdateTime() {
return updateTime;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdatedBy() {
return updatedBy;
public String getUpdateBy() {
return updateBy;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public List<EquCheckItemDetail> getFormStandard() {

@ -32,13 +32,13 @@ public class EquCheckItemVO {
/** 删除标识 */
private String delFlag ;
/** 创建时间 */
private Date createdTime ;
private Date createTime ;
/** 创建人 */
private String createdBy ;
private String createBy ;
/** 更新时间 */
private Date updatedTime ;
private Date updateTime ;
/** 更新人 */
private String updatedBy ;
private String updateBy ;
// 标准列表
private List<EquCheckItemDetail> formStandard;
// 设备名称
@ -158,36 +158,36 @@ public class EquCheckItemVO {
this.delFlag = delFlag;
}
public Date getCreatedTime() {
return createdTime;
public Date getCreateTime() {
return createTime;
}
public void setCreatedTime(Date createdTime) {
this.createdTime = createdTime;
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreatedBy() {
return createdBy;
public String getCreateBy() {
return createBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getUpdatedTime() {
return updatedTime;
public Date getUpdateTime() {
return updateTime;
}
public void setUpdatedTime(Date updatedTime) {
this.updatedTime = updatedTime;
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdatedBy() {
return updatedBy;
public String getUpdateBy() {
return updateBy;
}
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public List<EquCheckItemDetail> getFormStandard() {

@ -74,12 +74,12 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService {
@Override
@DS("#header.poolName")
public List<EquCheckItem> selectEquCheckItemList(EquCheckItem equCheckItem) {
if (equCheckItem.getCreatedTimeArray() != null) {
if (equCheckItem.getCreateTimeArray() != null) {
// 设置创建日期开始和结束值
if (equCheckItem.getCreatedTimeArray().size() == 2) {
if (equCheckItem.getCreateTimeArray().size() == 2) {
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
equCheckItem.setCreateTimeStart(formatter.format(equCheckItem.getCreatedTimeArray().get(0)));
equCheckItem.setCreateTimeEnd(formatter.format(equCheckItem.getCreatedTimeArray().get(1)));
equCheckItem.setCreateTimeStart(formatter.format(equCheckItem.getCreateTimeArray().get(0)));
equCheckItem.setCreateTimeEnd(formatter.format(equCheckItem.getCreateTimeArray().get(1)));
}
}
if (equCheckItem.getUpdateTimeArray() != null) {
@ -126,10 +126,10 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService {
equCheckItem.setItemId(IdUtils.fastSimpleUUID());
equCheckItem.setFactoryCode(factory);
equCheckItem.setItemCode(DateUtils.dateTimeNow(DateUtils.YYYYMMDD) + serialNum);
equCheckItem.setCreatedBy(SecurityContextHolder.getUserName());
equCheckItem.setCreatedTime(DateUtils.getNowDate());
equCheckItem.setUpdatedBy(SecurityContextHolder.getUserName());
equCheckItem.setUpdatedTime(DateUtils.getNowDate());
equCheckItem.setCreateBy(SecurityContextHolder.getUserName());
equCheckItem.setCreateTime(DateUtils.getNowDate());
equCheckItem.setUpdateBy(SecurityContextHolder.getUserName());
equCheckItem.setUpdateTime(DateUtils.getNowDate());
if (equCheckItem.getItemType().equals("spotInspection")) {
equCheckItem.setItemTypeName("点检");
}
@ -152,10 +152,10 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService {
detail.setParentCode(equCheckItem.getItemCode());
detail.setFactoryCode(factory);
detail.setDetailCode(equCheckItem.getItemCode() + detailSerialNum);
detail.setCreatedBy(SecurityContextHolder.getUserName());
detail.setCreatedTime(DateUtils.getNowDate());
detail.setUpdatedBy(SecurityContextHolder.getUserName());
detail.setUpdatedTime(DateUtils.getNowDate());
detail.setCreateBy(SecurityContextHolder.getUserName());
detail.setCreateTime(DateUtils.getNowDate());
detail.setUpdateBy(SecurityContextHolder.getUserName());
detail.setUpdateTime(DateUtils.getNowDate());
// 插入到数据库
equCheckItemDetailMapper.insertEquCheckItemDetail(detail);
@ -173,10 +173,10 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService {
equItemEquipment.setItemCode(equCheckItem.getItemCode());
equItemEquipment.setEquipmentCode(code);
equItemEquipment.setFactoryCode(factory);
equItemEquipment.setCreatedBy(SecurityContextHolder.getUserName());
equItemEquipment.setCreatedTime(DateUtils.getNowDate());
equItemEquipment.setUpdatedBy(SecurityContextHolder.getUserName());
equItemEquipment.setUpdatedTime(DateUtils.getNowDate());
equItemEquipment.setCreateBy(SecurityContextHolder.getUserName());
equItemEquipment.setCreateTime(DateUtils.getNowDate());
equItemEquipment.setUpdateBy(SecurityContextHolder.getUserName());
equItemEquipment.setUpdateTime(DateUtils.getNowDate());
// 插入数据库
equItemEquipmentMapper.insertEquItemEquipment(equItemEquipment);
@ -199,8 +199,8 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService {
BeanUtils.copyProperties(equCheckItemDTO, equCheckItem);
// 处理检查项信息
equCheckItem.setUpdatedBy(SecurityContextHolder.getUserName());
equCheckItem.setUpdatedTime(DateUtils.getNowDate());
equCheckItem.setUpdateBy(SecurityContextHolder.getUserName());
equCheckItem.setUpdateTime(DateUtils.getNowDate());
if (equCheckItem.getItemType().equals("spotInspection")) {
equCheckItem.setItemTypeName("点检");
}
@ -225,10 +225,10 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService {
detail.setParentCode(equCheckItem.getItemCode());
detail.setFactoryCode(equCheckItem.getFactoryCode());
detail.setDetailCode(equCheckItem.getItemCode() + detailSerialNum);
detail.setCreatedBy(SecurityContextHolder.getUserName());
detail.setCreatedTime(DateUtils.getNowDate());
detail.setUpdatedBy(SecurityContextHolder.getUserName());
detail.setUpdatedTime(DateUtils.getNowDate());
detail.setCreateBy(SecurityContextHolder.getUserName());
detail.setCreateTime(DateUtils.getNowDate());
detail.setUpdateBy(SecurityContextHolder.getUserName());
detail.setUpdateTime(DateUtils.getNowDate());
// 插入到数据库
equCheckItemDetailMapper.insertEquCheckItemDetail(detail);
@ -249,10 +249,10 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService {
equItemEquipment.setItemCode(equCheckItem.getItemCode());
equItemEquipment.setEquipmentCode(code);
equItemEquipment.setFactoryCode(equCheckItemDTO.getFactoryCode());
equItemEquipment.setCreatedBy(SecurityContextHolder.getUserName());
equItemEquipment.setCreatedTime(DateUtils.getNowDate());
equItemEquipment.setUpdatedBy(SecurityContextHolder.getUserName());
equItemEquipment.setUpdatedTime(DateUtils.getNowDate());
equItemEquipment.setCreateBy(SecurityContextHolder.getUserName());
equItemEquipment.setCreateTime(DateUtils.getNowDate());
equItemEquipment.setUpdateBy(SecurityContextHolder.getUserName());
equItemEquipment.setUpdateTime(DateUtils.getNowDate());
// 插入数据库
equItemEquipmentMapper.insertEquItemEquipment(equItemEquipment);

@ -17,15 +17,15 @@
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="delFlag" column="del_flag" />
<result property="createdTime" column="created_time" />
<result property="createdBy" column="created_by" />
<result property="updatedTime" column="updated_time" />
<result property="updatedBy" column="updated_by" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="detailCode" column="detail_code" />
</resultMap>
<sql id="selectEquCheckItemDetailVo">
select detail_id, parent_code, standard_type, standard_name, factory_code, detail_up_limit, detail_down_limit, detail_unit, attr1, attr2, attr3, del_flag, created_time, created_by, updated_time, updated_by, detail_code from equ_check_item_detail
select detail_id, parent_code, standard_type, standard_name, factory_code, detail_up_limit, detail_down_limit, detail_unit, attr1, attr2, attr3, del_flag, create_time, create_by, update_time, update_by, detail_code from equ_check_item_detail
</sql>
<select id="selectEquCheckItemDetailList" parameterType="EquCheckItemDetail" resultMap="EquCheckItemDetailResult">
@ -41,10 +41,10 @@
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="createdTime != null "> and created_time = #{createdTime}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="updatedTime != null "> and updated_time = #{updatedTime}</if>
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
<if test="detailCode != null and detailCode != ''"> and detail_code = #{detailCode}</if>
</where>
and del_flag = '0'
@ -58,13 +58,13 @@
<select id="selectSerialNumber" resultType="java.lang.Integer">
SELECT COUNT(detail_id)+1 AS serialNum
FROM equ_check_item_detail
WHERE CONVERT(date, GETDATE()) = CONVERT(date,created_time) and parent_code = #{itemCode} and del_flag = '0'
WHERE CONVERT(date, GETDATE()) = CONVERT(date,create_time) and parent_code = #{itemCode} and del_flag = '0'
</select>
<select id="selectEquCheckItemDetailByParentCode" parameterType="String" resultMap="EquCheckItemDetailResult">
<include refid="selectEquCheckItemDetailVo"/>
where parent_code = #{parentCode} and del_flag = '0'
ORDER BY created_time
ORDER BY create_time
</select>
<insert id="insertEquCheckItemDetail" parameterType="EquCheckItemDetail">
@ -82,10 +82,10 @@
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createdTime != null">created_time,</if>
<if test="createdBy != null and createdBy != ''">created_by,</if>
<if test="updatedTime != null">updated_time,</if>
<if test="updatedBy != null and updatedBy != ''">updated_by,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="detailCode != null and detailCode != ''">detail_code,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -101,10 +101,10 @@
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="createdBy != null and createdBy != ''">#{createdBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
<if test="updatedBy != null and updatedBy != ''">#{updatedBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="detailCode != null and detailCode != ''">#{detailCode},</if>
</trim>
</insert>
@ -123,10 +123,10 @@
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="createdBy != null and createdBy != ''">created_by = #{createdBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="updatedBy != null and updatedBy != ''">updated_by = #{updatedBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="detailCode != null and detailCode != ''">detail_code = #{detailCode},</if>
</trim>
where detail_id = #{detailId} and del_flag = '0'

@ -17,14 +17,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="delFlag" column="del_flag" />
<result property="createdTime" column="created_time" />
<result property="createdBy" column="created_by" />
<result property="updatedTime" column="updated_time" />
<result property="updatedBy" column="updated_by" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
</resultMap>
<sql id="selectEquCheckItemVo">
select item_id, item_code, item_name, item_method, item_type, item_type_name, item_remark, factory_code, attr1, attr2, attr3, del_flag, created_time, created_by, updated_time, updated_by from equ_check_item
select item_id, item_code, item_name, item_method, item_type, item_type_name, item_remark, factory_code, attr1, attr2, attr3, del_flag, create_time, create_by, update_time, update_by from equ_check_item
</sql>
<select id="selectEquCheckItemList" parameterType="EquCheckItem" resultMap="EquCheckItemResult">
@ -41,14 +41,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
<if test="createTimeStart != null "> and CONVERT(date,created_time) >= #{createTimeStart}</if>
<if test="createTimeEnd != null "> and #{createTimeEnd} >= CONVERT(date,created_time)</if>
<if test="createdBy != null and createdBy != ''"> and created_by like concat('%', #{createdBy}, '%')</if>
<if test="updateTimeStart != null "> and CONVERT(date,updated_time) >= #{updateTimeStart}</if>
<if test="updateTimeEnd != null "> and #{updateTimeEnd} >= CONVERT(date,updated_time)</if>
<if test="updatedBy != null and updatedBy != ''"> and updated_by like concat('%', #{updatedBy}, '%')</if>
<if test="createTimeStart != null "> and CONVERT(date,create_time) >= #{createTimeStart}</if>
<if test="createTimeEnd != null "> and #{createTimeEnd} >= CONVERT(date,create_time)</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="updateTimeStart != null "> and CONVERT(date,update_time) >= #{updateTimeStart}</if>
<if test="updateTimeEnd != null "> and #{updateTimeEnd} >= CONVERT(date,update_time)</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
and del_flag = '0'
ORDER BY created_time DESC
ORDER BY create_time DESC
</where>
</select>
@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSerialNumber" resultType="java.lang.Integer">
SELECT COUNT(item_id)+1 AS serialNum
FROM equ_check_item
WHERE CONVERT(date, GETDATE()) = CONVERT(date,created_time) and del_flag = '0'
WHERE CONVERT(date, GETDATE()) = CONVERT(date,create_time) and del_flag = '0'
</select>
<select id="selectAllEquipmentList" resultType="com.op.device.domain.vo.EquCheckItemVO">
@ -87,10 +87,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createdTime != null">created_time,</if>
<if test="createdBy != null and createdBy != ''">created_by,</if>
<if test="updatedTime != null">updated_time,</if>
<if test="updatedBy != null and updatedBy != ''">updated_by,</if>
<if test="createTime != null">create_time,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="itemId != null">#{itemId},</if>
@ -105,10 +105,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="createdBy != null and createdBy != ''">#{createdBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
<if test="updatedBy != null and updatedBy != ''">#{updatedBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
</trim>
</insert>
@ -126,10 +126,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="createdBy != null and createdBy != ''">created_by = #{createdBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="updatedBy != null and updatedBy != ''">updated_by = #{updatedBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
</trim>
where item_id = #{itemId} and del_flag = '0'
</update>

@ -14,14 +14,14 @@
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="delFlag" column="del_flag" />
<result property="createdBy" column="created_by" />
<result property="createdTime" column="created_time" />
<result property="updatedBy" column="updated_by" />
<result property="updatedTime" column="updated_time" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectEquItemEquipmentVo">
select id, conn_code, item_code, equipment_code, factory_code, attr1, attr2, attr3, del_flag, created_by, created_time, updated_by, updated_time from equ_item_equipment
select id, conn_code, item_code, equipment_code, factory_code, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time from equ_item_equipment
</sql>
<select id="selectEquItemEquipmentList" parameterType="EquItemEquipment" resultMap="EquItemEquipmentResult">
@ -34,10 +34,10 @@
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdTime != null "> and created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
<if test="updatedTime != null "> and updated_time = #{updatedTime}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
</where>
and del_flag = '0'
</select>
@ -50,7 +50,7 @@
<select id="selectSerialNumber" resultType="java.lang.Integer">
SELECT COUNT(id)+1 AS serialNum
FROM equ_item_equipment
WHERE CONVERT(date, GETDATE()) = CONVERT(date,created_time) and del_flag = '0'
WHERE CONVERT(date, GETDATE()) = CONVERT(date,create_time) and del_flag = '0'
</select>
<select id="selectEquipmentCodeList" resultType="java.lang.String">
@ -69,10 +69,10 @@
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createdBy != null and createdBy != ''">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updatedBy != null and updatedBy != ''">updated_by,</if>
<if test="updatedTime != null">updated_time,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -84,10 +84,10 @@
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createdBy != null and createdBy != ''">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null and updatedBy != ''">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
@ -102,10 +102,10 @@
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createdBy != null and createdBy != ''">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null and updatedBy != ''">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id} and del_flag = '0'
</update>

Loading…
Cancel
Save