Commit 0d6f1449 authored by qiankunpingtai's avatar qiankunpingtai
Browse files

从远程仓库更新

parents c868c071 2195b8bf
...@@ -59,7 +59,9 @@ public class DepotHeadVo4List { ...@@ -59,7 +59,9 @@ public class DepotHeadVo4List {
private Integer accountday; private Integer accountday;
private Boolean status; private String status;
private String linknumber;
private String projectName; private String projectName;
...@@ -291,14 +293,22 @@ public class DepotHeadVo4List { ...@@ -291,14 +293,22 @@ public class DepotHeadVo4List {
this.accountday = accountday; this.accountday = accountday;
} }
public Boolean getStatus() { public String getStatus() {
return status; return status;
} }
public void setStatus(Boolean status) { public void setStatus(String status) {
this.status = status; this.status = status;
} }
public String getLinknumber() {
return linknumber;
}
public void setLinknumber(String linknumber) {
this.linknumber = linknumber;
}
public String getProjectName() { public String getProjectName() {
return projectName; return projectName;
} }
......
...@@ -106,7 +106,7 @@ public class DepotHeadService { ...@@ -106,7 +106,7 @@ public class DepotHeadService {
depotHead.setOperpersonname(uName); depotHead.setOperpersonname(uName);
} }
depotHead.setCreatetime(new Timestamp(System.currentTimeMillis())); depotHead.setCreatetime(new Timestamp(System.currentTimeMillis()));
depotHead.setStatus(false); depotHead.setStatus(BusinessConstants.BILLS_STATUS_UN_AUDIT);
return depotHeadMapper.insert(depotHead); return depotHeadMapper.insert(depotHead);
} }
...@@ -142,7 +142,7 @@ public class DepotHeadService { ...@@ -142,7 +142,7 @@ public class DepotHeadService {
} }
@Transactional(value = "transactionManager", rollbackFor = Exception.class) @Transactional(value = "transactionManager", rollbackFor = Exception.class)
public int batchSetStatus(Boolean status, String depotHeadIDs) { public int batchSetStatus(String status, String depotHeadIDs) {
List<Long> ids = StringUtil.strToLongList(depotHeadIDs); List<Long> ids = StringUtil.strToLongList(depotHeadIDs);
DepotHead depotHead = new DepotHead(); DepotHead depotHead = new DepotHead();
depotHead.setStatus(status); depotHead.setStatus(status);
...@@ -275,7 +275,7 @@ public class DepotHeadService { ...@@ -275,7 +275,7 @@ public class DepotHeadService {
User userInfo=userService.getCurrentUser(); User userInfo=userService.getCurrentUser();
depotHead.setOperpersonname(userInfo==null?null:userInfo.getUsername()); depotHead.setOperpersonname(userInfo==null?null:userInfo.getUsername());
depotHead.setCreatetime(new Timestamp(System.currentTimeMillis())); depotHead.setCreatetime(new Timestamp(System.currentTimeMillis()));
depotHead.setStatus(false); depotHead.setStatus(BusinessConstants.BILLS_STATUS_UN_AUDIT);
depotHeadMapperEx.adddepotHead(depotHead); depotHeadMapperEx.adddepotHead(depotHead);
/**入库和出库处理预付款信息*/ /**入库和出库处理预付款信息*/
if(BusinessConstants.PAY_TYPE_PREPAID.equals(depotHead.getPaytype())){ if(BusinessConstants.PAY_TYPE_PREPAID.equals(depotHead.getPaytype())){
...@@ -285,6 +285,14 @@ public class DepotHeadService { ...@@ -285,6 +285,14 @@ public class DepotHeadService {
} }
/**入库和出库处理单据子表信息*/ /**入库和出库处理单据子表信息*/
depotItemService.saveDetials(inserted,deleted,updated,depotHead.getId()); depotItemService.saveDetials(inserted,deleted,updated,depotHead.getId());
/**如果关联单据号非空则更新订单的状态为2 */
if(depotHead.getLinknumber()!=null) {
DepotHead depotHeadOrders = new DepotHead();
depotHeadOrders.setStatus(BusinessConstants.BILLS_STATUS_SKIP);
DepotHeadExample example = new DepotHeadExample();
example.createCriteria().andNumberEqualTo(depotHead.getLinknumber());
depotHeadMapper.updateByExampleSelective(depotHeadOrders, example);
}
} }
/** /**
* create by: cjl * create by: cjl
......
...@@ -31,13 +31,17 @@ public class SystemConfigComponent implements ICommonQuery { ...@@ -31,13 +31,17 @@ public class SystemConfigComponent implements ICommonQuery {
} }
private List<?> getSystemConfigList(Map<String, String> map) { private List<?> getSystemConfigList(Map<String, String> map) {
String search = map.get(Constants.SEARCH);
String companyName = StringUtil.getInfo(search, "companyName");
String order = QueryUtils.order(map); String order = QueryUtils.order(map);
return systemConfigService.select(QueryUtils.offset(map), QueryUtils.rows(map)); return systemConfigService.select(companyName, QueryUtils.offset(map), QueryUtils.rows(map));
} }
@Override @Override
public Long counts(Map<String, String> map) { public Long counts(Map<String, String> map) {
return systemConfigService.countSystemConfig(); String search = map.get(Constants.SEARCH);
String companyName = StringUtil.getInfo(search, "companyName");
return systemConfigService.countSystemConfig(companyName);
} }
@Override @Override
......
...@@ -33,12 +33,12 @@ public class SystemConfigService { ...@@ -33,12 +33,12 @@ public class SystemConfigService {
SystemConfigExample example = new SystemConfigExample(); SystemConfigExample example = new SystemConfigExample();
return systemConfigMapper.selectByExample(example); return systemConfigMapper.selectByExample(example);
} }
public List<SystemConfig> select(int offset, int rows) { public List<SystemConfig> select(String companyName, int offset, int rows) {
return systemConfigMapperEx.selectByConditionSystemConfig(offset, rows); return systemConfigMapperEx.selectByConditionSystemConfig(companyName, offset, rows);
} }
public Long countSystemConfig() { public Long countSystemConfig(String companyName) {
return systemConfigMapperEx.countsBySystemConfig(); return systemConfigMapperEx.countsBySystemConfig(companyName);
} }
@Transactional(value = "transactionManager", rollbackFor = Exception.class) @Transactional(value = "transactionManager", rollbackFor = Exception.class)
...@@ -69,7 +69,7 @@ public class SystemConfigService { ...@@ -69,7 +69,7 @@ public class SystemConfigService {
public int checkIsNameExist(Long id, String name) { public int checkIsNameExist(Long id, String name) {
SystemConfigExample example = new SystemConfigExample(); SystemConfigExample example = new SystemConfigExample();
example.createCriteria().andIdNotEqualTo(id).andNameEqualTo(name); example.createCriteria().andIdNotEqualTo(id).andCompanyNameEqualTo(name);
List<SystemConfig> list = systemConfigMapper.selectByExample(example); List<SystemConfig> list = systemConfigMapper.selectByExample(example);
return list.size(); return list.size();
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jsh.erp.datasource.mappers.DepotHeadMapper"> <mapper namespace="com.jsh.erp.datasource.mappers.DepotHeadMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.DepotHead"> <resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.DepotHead">
<!-- <!--
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
<result column="OtherMoneyList" jdbcType="VARCHAR" property="othermoneylist" /> <result column="OtherMoneyList" jdbcType="VARCHAR" property="othermoneylist" />
<result column="OtherMoneyItem" jdbcType="VARCHAR" property="othermoneyitem" /> <result column="OtherMoneyItem" jdbcType="VARCHAR" property="othermoneyitem" />
<result column="AccountDay" jdbcType="INTEGER" property="accountday" /> <result column="AccountDay" jdbcType="INTEGER" property="accountday" />
<result column="Status" jdbcType="BIT" property="status" /> <result column="Status" jdbcType="VARCHAR" property="status" />
<result column="LinkNumber" jdbcType="VARCHAR" property="linknumber" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!-- <!--
...@@ -109,7 +110,8 @@ ...@@ -109,7 +110,8 @@
Id, Type, SubType, ProjectId, DefaultNumber, Number, OperPersonName, CreateTime, Id, Type, SubType, ProjectId, DefaultNumber, Number, OperPersonName, CreateTime,
OperTime, OrganId, HandsPersonId, AccountId, ChangeAmount, AllocationProjectId, TotalPrice, OperTime, OrganId, HandsPersonId, AccountId, ChangeAmount, AllocationProjectId, TotalPrice,
PayType, Remark, Salesman, AccountIdList, AccountMoneyList, Discount, DiscountMoney, PayType, Remark, Salesman, AccountIdList, AccountMoneyList, Discount, DiscountMoney,
DiscountLastMoney, OtherMoney, OtherMoneyList, OtherMoneyItem, AccountDay, Status DiscountLastMoney, OtherMoney, OtherMoneyList, OtherMoneyItem, AccountDay, Status,
LinkNumber
</sql> </sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotHeadExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -171,7 +173,7 @@ ...@@ -171,7 +173,7 @@
AccountIdList, AccountMoneyList, Discount, AccountIdList, AccountMoneyList, Discount,
DiscountMoney, DiscountLastMoney, OtherMoney, DiscountMoney, DiscountLastMoney, OtherMoney,
OtherMoneyList, OtherMoneyItem, AccountDay, OtherMoneyList, OtherMoneyItem, AccountDay,
Status) Status, LinkNumber)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{subtype,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{subtype,jdbcType=VARCHAR},
#{projectid,jdbcType=BIGINT}, #{defaultnumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, #{projectid,jdbcType=BIGINT}, #{defaultnumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR},
#{operpersonname,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{opertime,jdbcType=TIMESTAMP}, #{operpersonname,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{opertime,jdbcType=TIMESTAMP},
...@@ -181,7 +183,7 @@ ...@@ -181,7 +183,7 @@
#{accountidlist,jdbcType=VARCHAR}, #{accountmoneylist,jdbcType=VARCHAR}, #{discount,jdbcType=DECIMAL}, #{accountidlist,jdbcType=VARCHAR}, #{accountmoneylist,jdbcType=VARCHAR}, #{discount,jdbcType=DECIMAL},
#{discountmoney,jdbcType=DECIMAL}, #{discountlastmoney,jdbcType=DECIMAL}, #{othermoney,jdbcType=DECIMAL}, #{discountmoney,jdbcType=DECIMAL}, #{discountlastmoney,jdbcType=DECIMAL}, #{othermoney,jdbcType=DECIMAL},
#{othermoneylist,jdbcType=VARCHAR}, #{othermoneyitem,jdbcType=VARCHAR}, #{accountday,jdbcType=INTEGER}, #{othermoneylist,jdbcType=VARCHAR}, #{othermoneyitem,jdbcType=VARCHAR}, #{accountday,jdbcType=INTEGER},
#{status,jdbcType=BIT}) #{status,jdbcType=VARCHAR}, #{linknumber,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.DepotHead"> <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.DepotHead">
<!-- <!--
...@@ -274,6 +276,9 @@ ...@@ -274,6 +276,9 @@
<if test="status != null"> <if test="status != null">
Status, Status,
</if> </if>
<if test="linknumber != null">
LinkNumber,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
...@@ -358,7 +363,10 @@ ...@@ -358,7 +363,10 @@
#{accountday,jdbcType=INTEGER}, #{accountday,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="status != null">
#{status,jdbcType=BIT}, #{status,jdbcType=VARCHAR},
</if>
<if test="linknumber != null">
#{linknumber,jdbcType=VARCHAR},
</if> </if>
</trim> </trim>
</insert> </insert>
...@@ -461,7 +469,10 @@ ...@@ -461,7 +469,10 @@
AccountDay = #{record.accountday,jdbcType=INTEGER}, AccountDay = #{record.accountday,jdbcType=INTEGER},
</if> </if>
<if test="record.status != null"> <if test="record.status != null">
Status = #{record.status,jdbcType=BIT}, Status = #{record.status,jdbcType=VARCHAR},
</if>
<if test="record.linknumber != null">
LinkNumber = #{record.linknumber,jdbcType=VARCHAR},
</if> </if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -501,7 +512,8 @@ ...@@ -501,7 +512,8 @@
OtherMoneyList = #{record.othermoneylist,jdbcType=VARCHAR}, OtherMoneyList = #{record.othermoneylist,jdbcType=VARCHAR},
OtherMoneyItem = #{record.othermoneyitem,jdbcType=VARCHAR}, OtherMoneyItem = #{record.othermoneyitem,jdbcType=VARCHAR},
AccountDay = #{record.accountday,jdbcType=INTEGER}, AccountDay = #{record.accountday,jdbcType=INTEGER},
Status = #{record.status,jdbcType=BIT} Status = #{record.status,jdbcType=VARCHAR},
LinkNumber = #{record.linknumber,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -592,7 +604,10 @@ ...@@ -592,7 +604,10 @@
AccountDay = #{accountday,jdbcType=INTEGER}, AccountDay = #{accountday,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="status != null">
Status = #{status,jdbcType=BIT}, Status = #{status,jdbcType=VARCHAR},
</if>
<if test="linknumber != null">
LinkNumber = #{linknumber,jdbcType=VARCHAR},
</if> </if>
</set> </set>
where Id = #{id,jdbcType=BIGINT} where Id = #{id,jdbcType=BIGINT}
...@@ -629,7 +644,8 @@ ...@@ -629,7 +644,8 @@
OtherMoneyList = #{othermoneylist,jdbcType=VARCHAR}, OtherMoneyList = #{othermoneylist,jdbcType=VARCHAR},
OtherMoneyItem = #{othermoneyitem,jdbcType=VARCHAR}, OtherMoneyItem = #{othermoneyitem,jdbcType=VARCHAR},
AccountDay = #{accountday,jdbcType=INTEGER}, AccountDay = #{accountday,jdbcType=INTEGER},
Status = #{status,jdbcType=BIT} Status = #{status,jdbcType=VARCHAR},
LinkNumber = #{linknumber,jdbcType=VARCHAR}
where Id = #{id,jdbcType=BIGINT} where Id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -293,7 +293,7 @@ ...@@ -293,7 +293,7 @@
AccountIdList, AccountMoneyList, Discount, AccountIdList, AccountMoneyList, Discount,
DiscountMoney, DiscountLastMoney, OtherMoney, DiscountMoney, DiscountLastMoney, OtherMoney,
OtherMoneyList, OtherMoneyItem, AccountDay, OtherMoneyList, OtherMoneyItem, AccountDay,
Status) Status, LinkNumber)
values (#{type,jdbcType=VARCHAR}, #{subtype,jdbcType=VARCHAR}, values (#{type,jdbcType=VARCHAR}, #{subtype,jdbcType=VARCHAR},
#{projectid,jdbcType=BIGINT}, #{defaultnumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, #{projectid,jdbcType=BIGINT}, #{defaultnumber,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR},
#{operpersonname,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{opertime,jdbcType=TIMESTAMP}, #{operpersonname,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{opertime,jdbcType=TIMESTAMP},
...@@ -303,7 +303,7 @@ ...@@ -303,7 +303,7 @@
#{accountidlist,jdbcType=VARCHAR}, #{accountmoneylist,jdbcType=VARCHAR}, #{discount,jdbcType=DECIMAL}, #{accountidlist,jdbcType=VARCHAR}, #{accountmoneylist,jdbcType=VARCHAR}, #{discount,jdbcType=DECIMAL},
#{discountmoney,jdbcType=DECIMAL}, #{discountlastmoney,jdbcType=DECIMAL}, #{othermoney,jdbcType=DECIMAL}, #{discountmoney,jdbcType=DECIMAL}, #{discountlastmoney,jdbcType=DECIMAL}, #{othermoney,jdbcType=DECIMAL},
#{othermoneylist,jdbcType=VARCHAR}, #{othermoneyitem,jdbcType=VARCHAR}, #{accountday,jdbcType=INTEGER}, #{othermoneylist,jdbcType=VARCHAR}, #{othermoneyitem,jdbcType=VARCHAR}, #{accountday,jdbcType=INTEGER},
#{status,jdbcType=BIT}) #{status,jdbcType=VARCHAR}, #{linknumber,jdbcType=VARCHAR})
</insert> </insert>
<update id="updatedepotHead" parameterType="com.jsh.erp.datasource.entities.DepotHead"> <update id="updatedepotHead" parameterType="com.jsh.erp.datasource.entities.DepotHead">
update jsh_depothead update jsh_depothead
...@@ -384,7 +384,10 @@ ...@@ -384,7 +384,10 @@
AccountDay = #{accountday,jdbcType=INTEGER}, AccountDay = #{accountday,jdbcType=INTEGER},
</if> </if>
<if test="status != null"> <if test="status != null">
Status = #{status,jdbcType=BIT}, Status = #{status,jdbcType=VARCHAR},
</if>
<if test="linknumber != null">
LinkNumber = #{linknumber,jdbcType=VARCHAR},
</if> </if>
</set> </set>
where Id = #{id,jdbcType=BIGINT} where Id = #{id,jdbcType=BIGINT}
......
...@@ -7,10 +7,12 @@ ...@@ -7,10 +7,12 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="type" jdbcType="VARCHAR" property="type" /> <result column="company_name" jdbcType="VARCHAR" property="companyName" />
<result column="name" jdbcType="VARCHAR" property="name" /> <result column="company_contacts" jdbcType="VARCHAR" property="companyContacts" />
<result column="value" jdbcType="VARCHAR" property="value" /> <result column="company_address" jdbcType="VARCHAR" property="companyAddress" />
<result column="description" jdbcType="VARCHAR" property="description" /> <result column="company_tel" jdbcType="VARCHAR" property="companyTel" />
<result column="company_fax" jdbcType="VARCHAR" property="companyFax" />
<result column="company_post_code" jdbcType="VARCHAR" property="companyPostCode" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<!-- <!--
...@@ -83,7 +85,7 @@ ...@@ -83,7 +85,7 @@
WARNING - @mbggenerated WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
id, type, name, value, description id, company_name, company_contacts, company_address, company_tel, company_fax, company_post_code
</sql> </sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.SystemConfigExample" resultMap="BaseResultMap">
<!-- <!--
...@@ -136,10 +138,12 @@ ...@@ -136,10 +138,12 @@
WARNING - @mbggenerated WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
insert into jsh_systemconfig (id, type, name, insert into jsh_systemconfig (id, company_name, company_contacts,
value, description) company_address, company_tel, company_fax,
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, company_post_code)
#{value,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}) values (#{id,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, #{companyContacts,jdbcType=VARCHAR},
#{companyAddress,jdbcType=VARCHAR}, #{companyTel,jdbcType=VARCHAR}, #{companyFax,jdbcType=VARCHAR},
#{companyPostCode,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.SystemConfig"> <insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.SystemConfig">
<!-- <!--
...@@ -151,34 +155,46 @@ ...@@ -151,34 +155,46 @@
<if test="id != null"> <if test="id != null">
id, id,
</if> </if>
<if test="type != null"> <if test="companyName != null">
type, company_name,
</if> </if>
<if test="name != null"> <if test="companyContacts != null">
name, company_contacts,
</if> </if>
<if test="value != null"> <if test="companyAddress != null">
value, company_address,
</if> </if>
<if test="description != null"> <if test="companyTel != null">
description, company_tel,
</if>
<if test="companyFax != null">
company_fax,
</if>
<if test="companyPostCode != null">
company_post_code,
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null"> <if test="id != null">
#{id,jdbcType=BIGINT}, #{id,jdbcType=BIGINT},
</if> </if>
<if test="type != null"> <if test="companyName != null">
#{type,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR},
</if>
<if test="companyContacts != null">
#{companyContacts,jdbcType=VARCHAR},
</if>
<if test="companyAddress != null">
#{companyAddress,jdbcType=VARCHAR},
</if> </if>
<if test="name != null"> <if test="companyTel != null">
#{name,jdbcType=VARCHAR}, #{companyTel,jdbcType=VARCHAR},
</if> </if>
<if test="value != null"> <if test="companyFax != null">
#{value,jdbcType=VARCHAR}, #{companyFax,jdbcType=VARCHAR},
</if> </if>
<if test="description != null"> <if test="companyPostCode != null">
#{description,jdbcType=VARCHAR}, #{companyPostCode,jdbcType=VARCHAR},
</if> </if>
</trim> </trim>
</insert> </insert>
...@@ -202,17 +218,23 @@ ...@@ -202,17 +218,23 @@
<if test="record.id != null"> <if test="record.id != null">
id = #{record.id,jdbcType=BIGINT}, id = #{record.id,jdbcType=BIGINT},
</if> </if>
<if test="record.type != null"> <if test="record.companyName != null">
type = #{record.type,jdbcType=VARCHAR}, company_name = #{record.companyName,jdbcType=VARCHAR},
</if> </if>
<if test="record.name != null"> <if test="record.companyContacts != null">
name = #{record.name,jdbcType=VARCHAR}, company_contacts = #{record.companyContacts,jdbcType=VARCHAR},
</if> </if>
<if test="record.value != null"> <if test="record.companyAddress != null">
value = #{record.value,jdbcType=VARCHAR}, company_address = #{record.companyAddress,jdbcType=VARCHAR},
</if> </if>
<if test="record.description != null"> <if test="record.companyTel != null">
description = #{record.description,jdbcType=VARCHAR}, company_tel = #{record.companyTel,jdbcType=VARCHAR},
</if>
<if test="record.companyFax != null">
company_fax = #{record.companyFax,jdbcType=VARCHAR},
</if>
<if test="record.companyPostCode != null">
company_post_code = #{record.companyPostCode,jdbcType=VARCHAR},
</if> </if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -226,10 +248,12 @@ ...@@ -226,10 +248,12 @@
--> -->
update jsh_systemconfig update jsh_systemconfig
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
type = #{record.type,jdbcType=VARCHAR}, company_name = #{record.companyName,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR}, company_contacts = #{record.companyContacts,jdbcType=VARCHAR},
value = #{record.value,jdbcType=VARCHAR}, company_address = #{record.companyAddress,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR} company_tel = #{record.companyTel,jdbcType=VARCHAR},
company_fax = #{record.companyFax,jdbcType=VARCHAR},
company_post_code = #{record.companyPostCode,jdbcType=VARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -241,17 +265,23 @@ ...@@ -241,17 +265,23 @@
--> -->
update jsh_systemconfig update jsh_systemconfig
<set> <set>
<if test="type != null"> <if test="companyName != null">
type = #{type,jdbcType=VARCHAR}, company_name = #{companyName,jdbcType=VARCHAR},
</if>
<if test="companyContacts != null">
company_contacts = #{companyContacts,jdbcType=VARCHAR},
</if>
<if test="companyAddress != null">
company_address = #{companyAddress,jdbcType=VARCHAR},
</if> </if>
<if test="name != null"> <if test="companyTel != null">
name = #{name,jdbcType=VARCHAR}, company_tel = #{companyTel,jdbcType=VARCHAR},
</if> </if>
<if test="value != null"> <if test="companyFax != null">
value = #{value,jdbcType=VARCHAR}, company_fax = #{companyFax,jdbcType=VARCHAR},
</if> </if>
<if test="description != null"> <if test="companyPostCode != null">
description = #{description,jdbcType=VARCHAR}, company_post_code = #{companyPostCode,jdbcType=VARCHAR},
</if> </if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
...@@ -262,10 +292,12 @@ ...@@ -262,10 +292,12 @@
This element is automatically generated by MyBatis Generator, do not modify. This element is automatically generated by MyBatis Generator, do not modify.
--> -->
update jsh_systemconfig update jsh_systemconfig
set type = #{type,jdbcType=VARCHAR}, set company_name = #{companyName,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR}, company_contacts = #{companyContacts,jdbcType=VARCHAR},
value = #{value,jdbcType=VARCHAR}, company_address = #{companyAddress,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR} company_tel = #{companyTel,jdbcType=VARCHAR},
company_fax = #{companyFax,jdbcType=VARCHAR},
company_post_code = #{companyPostCode,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
select * select *
FROM jsh_systemconfig FROM jsh_systemconfig
where 1=1 where 1=1
<if test="companyName != null">
and company_name like '%${companyName}%'
</if>
<if test="offset != null and rows != null"> <if test="offset != null and rows != null">
limit #{offset},#{rows} limit #{offset},#{rows}
</if> </if>
...@@ -14,5 +17,8 @@ ...@@ -14,5 +17,8 @@
COUNT(id) COUNT(id)
FROM jsh_systemconfig FROM jsh_systemconfig
WHERE 1=1 WHERE 1=1
<if test="companyName != null">
and company_name like '%${companyName}%'
</if>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<generatorConfiguration> <generatorConfiguration>
<classPathEntry <classPathEntry
location="C:\Users\cjl\.m2\repository\mysql\mysql-connector-java\5.1.47\mysql-connector-java-5.1.47.jar"/> location="E:\maven-repository\mysql\mysql-connector-java\5.1.47\mysql-connector-java-5.1.47.jar"/>
<context id="DB2Tables" targetRuntime="MyBatis3" defaultModelType="flat"> <context id="DB2Tables" targetRuntime="MyBatis3" defaultModelType="flat">
<commentGenerator> <commentGenerator>
...@@ -59,12 +59,12 @@ ...@@ -59,12 +59,12 @@
<table tableName="jsh_materialproperty" domainObjectName="MaterialProperty"></table> <table tableName="jsh_materialproperty" domainObjectName="MaterialProperty"></table>
<table tableName="jsh_person" domainObjectName="Person"></table> <table tableName="jsh_person" domainObjectName="Person"></table>
<table tableName="jsh_role" domainObjectName="Role"></table> <table tableName="jsh_role" domainObjectName="Role"></table>
<table tableName="jsh_supplier" domainObjectName="Supplier"></table> <table tableName="jsh_supplier" domainObjectName="Supplier"></table>-->
<table tableName="jsh_systemconfig" domainObjectName="SystemConfig"></table> <table tableName="jsh_systemconfig" domainObjectName="SystemConfig"></table>
<table tableName="jsh_unit" domainObjectName="Unit"></table> <!--<table tableName="jsh_unit" domainObjectName="Unit"></table>
<table tableName="jsh_user" domainObjectName="User"></table> <table tableName="jsh_user" domainObjectName="User"></table>
<table tableName="jsh_userbusiness" domainObjectName="UserBusiness"></table>--> <table tableName="jsh_userbusiness" domainObjectName="UserBusiness"></table>
<!--<table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table>--> <table tableName="jsh_serial_number" domainObjectName="SerialNumber"></table>-->
<table tableName="jsh_organization" domainObjectName="Organization"></table> <table tableName="jsh_organization" domainObjectName="Organization"></table>
<!--<table tableName="jsh_orga_user_rel" domainObjectName="OrgaUserRel"></table>--> <!--<table tableName="jsh_orga_user_rel" domainObjectName="OrgaUserRel"></table>-->
</context> </context>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment