diff --git a/src/main/java/com/huaheng/api/U8/Service/ICSShipmentAPIService.java b/src/main/java/com/huaheng/api/U8/Service/ICSShipmentAPIService.java index 250804b..be14265 100644 --- a/src/main/java/com/huaheng/api/U8/Service/ICSShipmentAPIService.java +++ b/src/main/java/com/huaheng/api/U8/Service/ICSShipmentAPIService.java @@ -10,7 +10,6 @@ import com.huaheng.common.utils.StringUtils; import com.huaheng.common.utils.http.HttpUtils; import com.huaheng.common.utils.security.ShiroUtils; import com.huaheng.framework.web.domain.AjaxResult; -import com.huaheng.pc.general.company.domain.Company; import com.huaheng.pc.general.company.service.ICompanyService; import com.huaheng.pc.general.material.domain.Material; import com.huaheng.pc.general.material.service.IMaterialService; diff --git a/src/main/java/com/huaheng/api/U8/domain/ICSShipmentDetail.java b/src/main/java/com/huaheng/api/U8/domain/ICSShipmentDetail.java index adccec6..c008af1 100644 --- a/src/main/java/com/huaheng/api/U8/domain/ICSShipmentDetail.java +++ b/src/main/java/com/huaheng/api/U8/domain/ICSShipmentDetail.java @@ -1,6 +1,8 @@ package com.huaheng.api.U8.domain; +import org.apache.commons.lang3.builder.ToStringBuilder; + import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; @@ -420,4 +422,47 @@ public class ICSShipmentDetail implements Serializable { public void setMoDId(Integer moDId) { MoDId = moDId; } + + @Override + public String toString() { + return new ToStringBuilder(this) + .append("cCode", cCode) + .append("ID", ID) + .append("AutoID", AutoID) + .append("irowno", irowno) + .append("cItemName", cItemName) + .append("DLID", DLID) + .append("cSOCode", cSOCode) + .append("cSOID", cSOID) + .append("cSOAutoID", cSOAutoID) + .append("MoId", MoId) + .append("MoDId", MoDId) + .append("MoCode", MoCode) + .append("SortSeq", SortSeq) + .append("warehouseId", warehouseId) + .append("cWHCode", cWHCode) + .append("cWHName", cWHName) + .append("cInvCode", cInvCode) + .append("materialId", materialId) + .append("cInvName", cInvName) + .append("cInvStd", cInvStd) + .append("iQuantity", iQuantity) + .append("cQuantity", cQuantity) + .append("cComUnitName", cComUnitName) + .append("StartDate", StartDate) + .append("DueDate", DueDate) + .append("companyId", companyId) + .append("CompanyCode", CompanyCode) + .append("cModifyDate", cModifyDate) + .append("cMemo", cMemo) + .append("iMaIDs", iMaIDs) + .append("POCode", POCode) + .append("POID", POID) + .append("PODID", PODID) + .append("iTrIds", iTrIds) + .append("iDLsID", iDLsID) + .append("iArrsId", iArrsId) + .append("iPOsID", iPOsID) + .toString(); + } } diff --git a/src/main/java/com/huaheng/api/U8/domain/ICSShipmentHeader.java b/src/main/java/com/huaheng/api/U8/domain/ICSShipmentHeader.java index 8ef2414..7660a98 100644 --- a/src/main/java/com/huaheng/api/U8/domain/ICSShipmentHeader.java +++ b/src/main/java/com/huaheng/api/U8/domain/ICSShipmentHeader.java @@ -373,7 +373,6 @@ public class ICSShipmentHeader implements Serializable { .append("DLID", getDLID()) .append("cDLCode", getcDLCode()) .append("cCusCode", getcCusCode()) - .append("companyCode", getCompanyCode()) .append("cCusName", getcCusName()) .append("cSTName", getcSTName()) .toString(); diff --git a/src/main/java/com/huaheng/pc/general/location/controller/LocationController.java b/src/main/java/com/huaheng/pc/general/location/controller/LocationController.java index 0b94f35..72ed21a 100644 --- a/src/main/java/com/huaheng/pc/general/location/controller/LocationController.java +++ b/src/main/java/com/huaheng/pc/general/location/controller/LocationController.java @@ -80,6 +80,46 @@ public class LocationController extends BaseController } /** + * 批量新增库位 + */ + @GetMapping("/addBatch") + public String addBatch() + { + return prefix + "/addBatch"; + } + + /** + * 批量新增保存库位 + */ + @RequiresPermissions("general:location:add") + @Log(title = "通用-库位管理", operating = "新增库位", action = BusinessType.INSERT) + @PostMapping("/addBatchSave") + @ResponseBody + public AjaxResult addBatchSave(Location lastLocation) { + for (int i=1; i<=lastLocation.getRow().intValue(); i++) { + for (int j=1; j<=lastLocation.getLine().intValue(); j++) { + for (int k=1; k<=lastLocation.getLayer().intValue(); k++) { + for (int m=1; m<=lastLocation.getGrid().intValue(); m++) { + Integer roadway = (j / 2) + 1; + Location location = new Location(); + location.setRow(i); + location.setLine(j); + location.setLayer(k); + location.setGrid(m); + location.setZoneId(lastLocation.getZoneId()); + location.setZoneCode(lastLocation.getZoneCode()); + location.setType(lastLocation.getType()); + location.setRoadway(roadway); + location.setEnable(lastLocation.getEnable()); + locationService.insertLocation(location); + } + } + } + } + return AjaxResult.success(""); + } + + /** * 修改库位 */ @GetMapping("/edit/{id}") diff --git a/src/main/java/com/huaheng/pc/general/location/service/LocationServiceImpl.java b/src/main/java/com/huaheng/pc/general/location/service/LocationServiceImpl.java index e3c617b..e5031d8 100644 --- a/src/main/java/com/huaheng/pc/general/location/service/LocationServiceImpl.java +++ b/src/main/java/com/huaheng/pc/general/location/service/LocationServiceImpl.java @@ -108,9 +108,8 @@ public class LocationServiceImpl implements ILocationService { String.format("%02d", location.getGrid())); Location locationCondition = new Location(); locationCondition.setCode(code); - if (this.selectFirstEntity(locationCondition) != null) - { - throw new ServiceException("货位号(" + code + ")已经存在"); + if (this.selectFirstEntity(locationCondition) != null) { + return true; } else { diff --git a/src/main/resources/mybatis/general/CompanyMapperAuto.xml b/src/main/resources/mybatis/general/CompanyMapperAuto.xml index 115dbb1..c3989b4 100644 --- a/src/main/resources/mybatis/general/CompanyMapperAuto.xml +++ b/src/main/resources/mybatis/general/CompanyMapperAuto.xml @@ -2,286 +2,908 @@ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.huaheng.pc.general.company.mapper.CompanyMapperAuto"> <select id="selectListEntityByLike" resultType="com.huaheng.pc.general.company.domain.Company"> - SELECT id, warehouseId, warehouseCode, companyId, companyCode - FROM warehouse_company + SELECT id, code, parentId, type, name, address1, address2, city, province, country, postalCode, attentionTo, phoneNum, mobile, faxNum, email, created, createdBy, lastUpdated, lastUpdatedBy, enable, deleted, userDef1, userDef2, userDef3 + FROM company <where> <if test="id != null "> AND id = #{id} </if> - <if test="warehouseId != null "> - AND warehouseId = #{warehouseId} + <if test="code != null and code != '' "> + AND code = #{code} </if> - <if test="warehouseCode != null and warehouseCode != '' "> - AND warehouseCode = #{warehouseCode} + <if test="parentId != null "> + AND parentId = #{parentId} </if> - <if test="companyIdList != null and companyIdList.size() > 0 "> - AND companyId in - <foreach collection="companyIdList" item="companyIdItem" open="(" separator="," close=")"> - #{companyIdItem} - </foreach> + <if test="type != null and type != '' "> + AND type = #{type} </if> - <if test="companyId != null "> - AND companyId = #{companyId} + <if test="name != null and name != ''"> + <bind name="namePattern" value="'%' + name + '%'" /> + AND name like #{namePattern} </if> - <if test="companyCodeList != null and companyCodeList.size() > 0 "> - AND companyCode in - <foreach collection="companyCodeList" item="companyCodeItem" open="(" separator="," close=")"> - #{companyCodeItem} - </foreach> + <if test="address1 != null and address1 != ''"> + <bind name="address1Pattern" value="'%' + address1 + '%'" /> + AND address1 like #{address1Pattern} </if> - <if test="companyCode != null and companyCode != '' "> - AND companyCode = #{companyCode} + <if test="address2 != null and address2 != ''"> + <bind name="address2Pattern" value="'%' + address2 + '%'" /> + AND address2 like #{address2Pattern} + </if> + <if test="city != null and city != ''"> + <bind name="cityPattern" value="'%' + city + '%'" /> + AND city like #{cityPattern} + </if> + <if test="province != null and province != ''"> + <bind name="provincePattern" value="'%' + province + '%'" /> + AND province like #{provincePattern} + </if> + <if test="country != null and country != ''"> + <bind name="countryPattern" value="'%' + country + '%'" /> + AND country like #{countryPattern} + </if> + <if test="postalCode != null and postalCode != '' "> + AND postalCode = #{postalCode} + </if> + <if test="attentionTo != null and attentionTo != ''"> + <bind name="attentionToPattern" value="'%' + attentionTo + '%'" /> + AND attentionTo like #{attentionToPattern} + </if> + <if test="phoneNum != null and phoneNum != ''"> + <bind name="phoneNumPattern" value="'%' + phoneNum + '%'" /> + AND phoneNum like #{phoneNumPattern} + </if> + <if test="mobile != null and mobile != ''"> + <bind name="mobilePattern" value="'%' + mobile + '%'" /> + AND mobile like #{mobilePattern} + </if> + <if test="faxNum != null and faxNum != ''"> + <bind name="faxNumPattern" value="'%' + faxNum + '%'" /> + AND faxNum like #{faxNumPattern} + </if> + <if test="email != null and email != ''"> + <bind name="emailPattern" value="'%' + email + '%'" /> + AND email like #{emailPattern} + </if> + <if test="params != null and params.createdBegin != null and params.createdBegin != ''"> + AND created >= #{params.createdBegin} + </if> + <if test="params != null and params.createdEnd != null and params.createdEnd != ''"> + AND created <= #{params.createdEnd} + </if> + <if test="createdBy != null and createdBy != ''"> + <bind name="createdByPattern" value="'%' + createdBy + '%'" /> + AND createdBy like #{createdByPattern} + </if> + <if test="params != null and params.lastUpdatedBegin != null and params.lastUpdatedBegin != ''"> + AND lastUpdated >= #{params.lastUpdatedBegin} + </if> + <if test="params != null and params.lastUpdatedEnd != null and params.lastUpdatedEnd != ''"> + AND lastUpdated <= #{params.lastUpdatedEnd} + </if> + <if test="lastUpdatedBy != null and lastUpdatedBy != ''"> + <bind name="lastUpdatedByPattern" value="'%' + lastUpdatedBy + '%'" /> + AND lastUpdatedBy like #{lastUpdatedByPattern} + </if> + <if test="enable != null "> + AND enable = #{enable} + </if> + <if test="deleted != null "> + AND deleted = #{deleted} + </if> + <if test="userDef1 != null and userDef1 != ''"> + <bind name="userDef1Pattern" value="'%' + userDef1 + '%'" /> + AND userDef1 like #{userDef1Pattern} + </if> + <if test="userDef2 != null and userDef2 != ''"> + <bind name="userDef2Pattern" value="'%' + userDef2 + '%'" /> + AND userDef2 like #{userDef2Pattern} + </if> + <if test="userDef3 != null and userDef3 != ''"> + <bind name="userDef3Pattern" value="'%' + userDef3 + '%'" /> + AND userDef3 like #{userDef3Pattern} </if> </where> </select> <select id="selectListEntityByEqual" resultType="com.huaheng.pc.general.company.domain.Company"> - SELECT id, warehouseId, warehouseCode, companyId, companyCode - FROM warehouse_company + SELECT id, code, parentId, type, name, address1, address2, city, province, country, postalCode, attentionTo, phoneNum, mobile, faxNum, email, created, createdBy, lastUpdated, lastUpdatedBy, enable, deleted, userDef1, userDef2, userDef3 + FROM company <where> <if test="id != null"> AND id = #{id} </if> - <if test="warehouseId != null"> - AND warehouseId = #{warehouseId} + <if test="code != null"> + AND code = #{code} + </if> + <if test="parentId != null"> + AND parentId = #{parentId} + </if> + <if test="type != null"> + AND type = #{type} + </if> + <if test="name != null"> + AND name = #{name} + </if> + <if test="address1 != null"> + AND address1 = #{address1} + </if> + <if test="address2 != null"> + AND address2 = #{address2} + </if> + <if test="city != null"> + AND city = #{city} + </if> + <if test="province != null"> + AND province = #{province} </if> - <if test="warehouseCode != null"> - AND warehouseCode = #{warehouseCode} + <if test="country != null"> + AND country = #{country} </if> - <if test="companyIdList != null and companyIdList.size() > 0 "> - AND companyId in - <foreach collection="companyIdList" item="companyIdItem" open="(" separator="," close=")"> - #{companyIdItem} - </foreach> + <if test="postalCode != null"> + AND postalCode = #{postalCode} </if> - <if test="companyId != null"> - AND companyId = #{companyId} + <if test="attentionTo != null"> + AND attentionTo = #{attentionTo} </if> - <if test="companyCodeList != null and companyCodeList.size() > 0 "> - AND companyCode in - <foreach collection="companyCodeList" item="companyCodeItem" open="(" separator="," close=")"> - #{companyCodeItem} - </foreach> + <if test="phoneNum != null"> + AND phoneNum = #{phoneNum} </if> - <if test="companyCode != null"> - AND companyCode = #{companyCode} + <if test="mobile != null"> + AND mobile = #{mobile} + </if> + <if test="faxNum != null"> + AND faxNum = #{faxNum} + </if> + <if test="email != null"> + AND email = #{email} + </if> + <if test="created != null"> + AND created = #{created} + </if> + <if test="createdBy != null"> + AND createdBy = #{createdBy} + </if> + <if test="lastUpdated != null"> + AND lastUpdated = #{lastUpdated} + </if> + <if test="lastUpdatedBy != null"> + AND lastUpdatedBy = #{lastUpdatedBy} + </if> + <if test="enable != null"> + AND enable = #{enable} + </if> + <if test="deleted != null"> + AND deleted = #{deleted} + </if> + <if test="userDef1 != null"> + AND userDef1 = #{userDef1} + </if> + <if test="userDef2 != null"> + AND userDef2 = #{userDef2} + </if> + <if test="userDef3 != null"> + AND userDef3 = #{userDef3} </if> </where> </select> <select id="selectListMapByEqual" resultType="java.util.HashMap"> - SELECT ${columns} FROM warehouse_company + SELECT ${columns} FROM company <where> <if test="condition.id != null"> AND id = #{condition.id} </if> - <if test="condition.warehouseId != null"> - AND warehouseId = #{condition.warehouseId} + <if test="condition.code != null"> + AND code = #{condition.code} + </if> + <if test="condition.parentId != null"> + AND parentId = #{condition.parentId} + </if> + <if test="condition.type != null"> + AND type = #{condition.type} + </if> + <if test="condition.name != null"> + AND name = #{condition.name} + </if> + <if test="condition.address1 != null"> + AND address1 = #{condition.address1} + </if> + <if test="condition.address2 != null"> + AND address2 = #{condition.address2} + </if> + <if test="condition.city != null"> + AND city = #{condition.city} + </if> + <if test="condition.province != null"> + AND province = #{condition.province} + </if> + <if test="condition.country != null"> + AND country = #{condition.country} + </if> + <if test="condition.postalCode != null"> + AND postalCode = #{condition.postalCode} + </if> + <if test="condition.attentionTo != null"> + AND attentionTo = #{condition.attentionTo} + </if> + <if test="condition.phoneNum != null"> + AND phoneNum = #{condition.phoneNum} + </if> + <if test="condition.mobile != null"> + AND mobile = #{condition.mobile} + </if> + <if test="condition.faxNum != null"> + AND faxNum = #{condition.faxNum} + </if> + <if test="condition.email != null"> + AND email = #{condition.email} + </if> + <if test="condition.created != null"> + AND created = #{condition.created} </if> - <if test="condition.warehouseCode != null"> - AND warehouseCode = #{condition.warehouseCode} + <if test="condition.createdBy != null"> + AND createdBy = #{condition.createdBy} </if> - <if test="condition.companyIdList != null and condition.companyIdList.size() > 0 "> - AND companyId in - <foreach collection="condition.companyIdList" item="companyIdItem" open="(" separator="," close=")"> - #{companyIdItem} - </foreach> + <if test="condition.lastUpdated != null"> + AND lastUpdated = #{condition.lastUpdated} </if> - <if test="condition.companyId != null"> - AND companyId = #{condition.companyId} + <if test="condition.lastUpdatedBy != null"> + AND lastUpdatedBy = #{condition.lastUpdatedBy} </if> - <if test="condition.companyCodeList != null and condition.companyCodeList.size() > 0 "> - AND companyCode in - <foreach collection="condition.companyCodeList" item="companyCodeItem" open="(" separator="," close=")"> - #{companyCodeItem} - </foreach> + <if test="condition.enable != null"> + AND enable = #{condition.enable} </if> - <if test="condition.companyCode != null"> - AND companyCode = #{condition.companyCode} + <if test="condition.deleted != null"> + AND deleted = #{condition.deleted} + </if> + <if test="condition.userDef1 != null"> + AND userDef1 = #{condition.userDef1} + </if> + <if test="condition.userDef2 != null"> + AND userDef2 = #{condition.userDef2} + </if> + <if test="condition.userDef3 != null"> + AND userDef3 = #{condition.userDef3} </if> </where> </select> <select id="selectEntityById" resultType="com.huaheng.pc.general.company.domain.Company"> - SELECT id, warehouseId, warehouseCode, companyId, companyCode FROM warehouse_company WHERE id = #{id} + SELECT id, code, parentId, type, name, address1, address2, city, province, country, postalCode, attentionTo, phoneNum, mobile, faxNum, email, created, createdBy, lastUpdated, lastUpdatedBy, enable, deleted, userDef1, userDef2, userDef3 FROM company WHERE id = #{id} </select> <select id="selectFirstEntity" resultType="com.huaheng.pc.general.company.domain.Company"> - SELECT id, warehouseId, warehouseCode, companyId, companyCode - FROM warehouse_company + SELECT id, code, parentId, type, name, address1, address2, city, province, country, postalCode, attentionTo, phoneNum, mobile, faxNum, email, created, createdBy, lastUpdated, lastUpdatedBy, enable, deleted, userDef1, userDef2, userDef3 + FROM company <where> <if test="id != null"> AND id = #{id} </if> - <if test="warehouseId != null"> - AND warehouseId = #{warehouseId} + <if test="code != null"> + AND code = #{code} + </if> + <if test="parentId != null"> + AND parentId = #{parentId} + </if> + <if test="type != null"> + AND type = #{type} + </if> + <if test="name != null"> + AND name = #{name} + </if> + <if test="address1 != null"> + AND address1 = #{address1} + </if> + <if test="address2 != null"> + AND address2 = #{address2} + </if> + <if test="city != null"> + AND city = #{city} + </if> + <if test="province != null"> + AND province = #{province} + </if> + <if test="country != null"> + AND country = #{country} + </if> + <if test="postalCode != null"> + AND postalCode = #{postalCode} + </if> + <if test="attentionTo != null"> + AND attentionTo = #{attentionTo} + </if> + <if test="phoneNum != null"> + AND phoneNum = #{phoneNum} </if> - <if test="warehouseCode != null"> - AND warehouseCode = #{warehouseCode} + <if test="mobile != null"> + AND mobile = #{mobile} </if> - <if test="companyIdList != null and companyIdList.size() > 0 "> - AND companyId in - <foreach collection="companyIdList" item="companyIdItem" open="(" separator="," close=")"> - #{companyIdItem} - </foreach> + <if test="faxNum != null"> + AND faxNum = #{faxNum} </if> - <if test="companyId != null"> - AND companyId = #{companyId} + <if test="email != null"> + AND email = #{email} </if> - <if test="companyCodeList != null and companyCodeList.size() > 0 "> - AND companyCode in - <foreach collection="companyCodeList" item="companyCodeItem" open="(" separator="," close=")"> - #{companyCodeItem} - </foreach> + <if test="created != null"> + AND created = #{created} </if> - <if test="companyCode != null"> - AND companyCode = #{companyCode} + <if test="createdBy != null"> + AND createdBy = #{createdBy} + </if> + <if test="lastUpdated != null"> + AND lastUpdated = #{lastUpdated} + </if> + <if test="lastUpdatedBy != null"> + AND lastUpdatedBy = #{lastUpdatedBy} + </if> + <if test="enable != null"> + AND enable = #{enable} + </if> + <if test="deleted != null"> + AND deleted = #{deleted} + </if> + <if test="userDef1 != null"> + AND userDef1 = #{userDef1} + </if> + <if test="userDef2 != null"> + AND userDef2 = #{userDef2} + </if> + <if test="userDef3 != null"> + AND userDef3 = #{userDef3} </if> </where> LIMIT 1 </select> <select id="selectFirstMap" resultType="java.util.HashMap"> - SELECT ${columns} FROM warehouse_company + SELECT ${columns} FROM company <where> <if test="condition.id != null"> AND id = #{condition.id} </if> - <if test="condition.warehouseId != null"> - AND warehouseId = #{condition.warehouseId} + <if test="condition.code != null"> + AND code = #{condition.code} + </if> + <if test="condition.parentId != null"> + AND parentId = #{condition.parentId} + </if> + <if test="condition.type != null"> + AND type = #{condition.type} + </if> + <if test="condition.name != null"> + AND name = #{condition.name} + </if> + <if test="condition.address1 != null"> + AND address1 = #{condition.address1} + </if> + <if test="condition.address2 != null"> + AND address2 = #{condition.address2} + </if> + <if test="condition.city != null"> + AND city = #{condition.city} </if> - <if test="condition.warehouseCode != null"> - AND warehouseCode = #{condition.warehouseCode} + <if test="condition.province != null"> + AND province = #{condition.province} </if> - <if test="condition.companyIdList != null and condition.companyIdList.size() > 0 "> - AND companyId in - <foreach collection="condition.companyIdList" item="companyIdItem" open="(" separator="," close=")"> - #{companyIdItem} - </foreach> + <if test="condition.country != null"> + AND country = #{condition.country} </if> - <if test="condition.companyId != null"> - AND companyId = #{condition.companyId} + <if test="condition.postalCode != null"> + AND postalCode = #{condition.postalCode} </if> - <if test="condition.companyCodeList != null and condition.companyCodeList.size() > 0 "> - AND companyCode in - <foreach collection="condition.companyCodeList" item="companyCodeItem" open="(" separator="," close=")"> - #{companyCodeItem} - </foreach> + <if test="condition.attentionTo != null"> + AND attentionTo = #{condition.attentionTo} </if> - <if test="condition.companyCode != null"> - AND companyCode = #{condition.companyCode} + <if test="condition.phoneNum != null"> + AND phoneNum = #{condition.phoneNum} + </if> + <if test="condition.mobile != null"> + AND mobile = #{condition.mobile} + </if> + <if test="condition.faxNum != null"> + AND faxNum = #{condition.faxNum} + </if> + <if test="condition.email != null"> + AND email = #{condition.email} + </if> + <if test="condition.created != null"> + AND created = #{condition.created} + </if> + <if test="condition.createdBy != null"> + AND createdBy = #{condition.createdBy} + </if> + <if test="condition.lastUpdated != null"> + AND lastUpdated = #{condition.lastUpdated} + </if> + <if test="condition.lastUpdatedBy != null"> + AND lastUpdatedBy = #{condition.lastUpdatedBy} + </if> + <if test="condition.enable != null"> + AND enable = #{condition.enable} + </if> + <if test="condition.deleted != null"> + AND deleted = #{condition.deleted} + </if> + <if test="condition.userDef1 != null"> + AND userDef1 = #{condition.userDef1} + </if> + <if test="condition.userDef2 != null"> + AND userDef2 = #{condition.userDef2} + </if> + <if test="condition.userDef3 != null"> + AND userDef3 = #{condition.userDef3} </if> </where> LIMIT 1 </select> <insert id="insert" parameterType="com.huaheng.pc.general.company.domain.Company" keyProperty="id" useGeneratedKeys="true" > - INSERT INTO warehouse_company + INSERT INTO company <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="warehouseId != null"> - warehouseId, + <if test="code != null"> + code, + </if> + <if test="parentId != null"> + parentId, + </if> + <if test="type != null"> + type, + </if> + <if test="name != null"> + name, + </if> + <if test="address1 != null"> + address1, + </if> + <if test="address2 != null"> + address2, + </if> + <if test="city != null"> + city, + </if> + <if test="province != null"> + province, + </if> + <if test="country != null"> + country, + </if> + <if test="postalCode != null"> + postalCode, + </if> + <if test="attentionTo != null"> + attentionTo, + </if> + <if test="phoneNum != null"> + phoneNum, + </if> + <if test="mobile != null"> + mobile, + </if> + <if test="faxNum != null"> + faxNum, + </if> + <if test="email != null"> + email, </if> - <if test="warehouseCode != null"> - warehouseCode, + <if test="created != null"> + created, </if> - <if test="companyId != null"> - companyId, + <if test="createdBy != null"> + createdBy, </if> - <if test="companyCode != null"> - companyCode, + <if test="lastUpdated != null"> + lastUpdated, + </if> + <if test="lastUpdatedBy != null"> + lastUpdatedBy, + </if> + <if test="enable != null"> + enable, + </if> + <if test="deleted != null"> + deleted, + </if> + <if test="userDef1 != null"> + userDef1, + </if> + <if test="userDef2 != null"> + userDef2, + </if> + <if test="userDef3 != null"> + userDef3, </if> </trim> <trim prefix=" values (" suffix=")" suffixOverrides=","> - <if test="warehouseId != null"> - #{warehouseId, jdbcType=INTEGER}, + <if test="code != null"> + #{code, jdbcType=VARCHAR}, + </if> + <if test="parentId != null"> + #{parentId, jdbcType=INTEGER}, + </if> + <if test="type != null"> + #{type, jdbcType=VARCHAR}, + </if> + <if test="name != null"> + #{name, jdbcType=VARCHAR}, + </if> + <if test="address1 != null"> + #{address1, jdbcType=VARCHAR}, + </if> + <if test="address2 != null"> + #{address2, jdbcType=VARCHAR}, + </if> + <if test="city != null"> + #{city, jdbcType=VARCHAR}, + </if> + <if test="province != null"> + #{province, jdbcType=VARCHAR}, + </if> + <if test="country != null"> + #{country, jdbcType=VARCHAR}, </if> - <if test="warehouseCode != null"> - #{warehouseCode, jdbcType=VARCHAR}, + <if test="postalCode != null"> + #{postalCode, jdbcType=VARCHAR}, </if> - <if test="companyId != null"> - #{companyId, jdbcType=INTEGER}, + <if test="attentionTo != null"> + #{attentionTo, jdbcType=VARCHAR}, </if> - <if test="companyCode != null"> - #{companyCode, jdbcType=VARCHAR}, + <if test="phoneNum != null"> + #{phoneNum, jdbcType=VARCHAR}, + </if> + <if test="mobile != null"> + #{mobile, jdbcType=VARCHAR}, + </if> + <if test="faxNum != null"> + #{faxNum, jdbcType=VARCHAR}, + </if> + <if test="email != null"> + #{email, jdbcType=VARCHAR}, + </if> + <if test="created != null"> + #{created, jdbcType=TIMESTAMP}, + </if> + <if test="createdBy != null"> + #{createdBy, jdbcType=VARCHAR}, + </if> + <if test="lastUpdated != null"> + #{lastUpdated, jdbcType=TIMESTAMP}, + </if> + <if test="lastUpdatedBy != null"> + #{lastUpdatedBy, jdbcType=VARCHAR}, + </if> + <if test="enable != null"> + #{enable, jdbcType=BIT}, + </if> + <if test="deleted != null"> + #{deleted, jdbcType=BIT}, + </if> + <if test="userDef1 != null"> + #{userDef1, jdbcType=VARCHAR}, + </if> + <if test="userDef2 != null"> + #{userDef2, jdbcType=VARCHAR}, + </if> + <if test="userDef3 != null"> + #{userDef3, jdbcType=VARCHAR}, </if> </trim> </insert> <update id="updateByModel"> - UPDATE warehouse_company + UPDATE company <set> - <if test="warehouseId != null"> - warehouseId = #{warehouseId, jdbcType=INTEGER}, + <if test="code != null"> + code = #{code, jdbcType=VARCHAR}, + </if> + <if test="parentId != null"> + parentId = #{parentId, jdbcType=INTEGER}, </if> - <if test="warehouseCode != null"> - warehouseCode = #{warehouseCode, jdbcType=VARCHAR}, + <if test="type != null"> + type = #{type, jdbcType=VARCHAR}, </if> - <if test="companyId != null"> - companyId = #{companyId, jdbcType=INTEGER}, + <if test="name != null"> + name = #{name, jdbcType=VARCHAR}, </if> - <if test="companyCode != null"> - companyCode = #{companyCode, jdbcType=VARCHAR}, + <if test="address1 != null"> + address1 = #{address1, jdbcType=VARCHAR}, + </if> + <if test="address2 != null"> + address2 = #{address2, jdbcType=VARCHAR}, + </if> + <if test="city != null"> + city = #{city, jdbcType=VARCHAR}, + </if> + <if test="province != null"> + province = #{province, jdbcType=VARCHAR}, + </if> + <if test="country != null"> + country = #{country, jdbcType=VARCHAR}, + </if> + <if test="postalCode != null"> + postalCode = #{postalCode, jdbcType=VARCHAR}, + </if> + <if test="attentionTo != null"> + attentionTo = #{attentionTo, jdbcType=VARCHAR}, + </if> + <if test="phoneNum != null"> + phoneNum = #{phoneNum, jdbcType=VARCHAR}, + </if> + <if test="mobile != null"> + mobile = #{mobile, jdbcType=VARCHAR}, + </if> + <if test="faxNum != null"> + faxNum = #{faxNum, jdbcType=VARCHAR}, + </if> + <if test="email != null"> + email = #{email, jdbcType=VARCHAR}, + </if> + <if test="created != null"> + created = #{created, jdbcType=TIMESTAMP}, + </if> + <if test="createdBy != null"> + createdBy = #{createdBy, jdbcType=VARCHAR}, + </if> + <if test="lastUpdated != null"> + lastUpdated = #{lastUpdated, jdbcType=TIMESTAMP}, + </if> + <if test="lastUpdatedBy != null"> + lastUpdatedBy = #{lastUpdatedBy, jdbcType=VARCHAR}, + </if> + <if test="enable != null"> + enable = #{enable, jdbcType=BIT}, + </if> + <if test="deleted != null"> + deleted = #{deleted, jdbcType=BIT}, + </if> + <if test="userDef1 != null"> + userDef1 = #{userDef1, jdbcType=VARCHAR}, + </if> + <if test="userDef2 != null"> + userDef2 = #{userDef2, jdbcType=VARCHAR}, + </if> + <if test="userDef3 != null"> + userDef3 = #{userDef3, jdbcType=VARCHAR}, </if> </set> WHERE id = #{id,jdbcType=INTEGER} </update> <update id="updateByCondition"> - UPDATE warehouse_company + UPDATE company <set> - <if test="record.warehouseId != null"> - warehouseId = #{record.warehouseId, jdbcType=INTEGER}, + <if test="record.code != null"> + code = #{record.code, jdbcType=VARCHAR}, + </if> + <if test="record.parentId != null"> + parentId = #{record.parentId, jdbcType=INTEGER}, + </if> + <if test="record.type != null"> + type = #{record.type, jdbcType=VARCHAR}, + </if> + <if test="record.name != null"> + name = #{record.name, jdbcType=VARCHAR}, + </if> + <if test="record.address1 != null"> + address1 = #{record.address1, jdbcType=VARCHAR}, + </if> + <if test="record.address2 != null"> + address2 = #{record.address2, jdbcType=VARCHAR}, + </if> + <if test="record.city != null"> + city = #{record.city, jdbcType=VARCHAR}, + </if> + <if test="record.province != null"> + province = #{record.province, jdbcType=VARCHAR}, </if> - <if test="record.warehouseCode != null"> - warehouseCode = #{record.warehouseCode, jdbcType=VARCHAR}, + <if test="record.country != null"> + country = #{record.country, jdbcType=VARCHAR}, </if> - <if test="record.companyId != null"> - companyId = #{record.companyId, jdbcType=INTEGER}, + <if test="record.postalCode != null"> + postalCode = #{record.postalCode, jdbcType=VARCHAR}, </if> - <if test="record.companyCode != null"> - companyCode = #{record.companyCode, jdbcType=VARCHAR}, + <if test="record.attentionTo != null"> + attentionTo = #{record.attentionTo, jdbcType=VARCHAR}, + </if> + <if test="record.phoneNum != null"> + phoneNum = #{record.phoneNum, jdbcType=VARCHAR}, + </if> + <if test="record.mobile != null"> + mobile = #{record.mobile, jdbcType=VARCHAR}, + </if> + <if test="record.faxNum != null"> + faxNum = #{record.faxNum, jdbcType=VARCHAR}, + </if> + <if test="record.email != null"> + email = #{record.email, jdbcType=VARCHAR}, + </if> + <if test="record.created != null"> + created = #{record.created, jdbcType=TIMESTAMP}, + </if> + <if test="record.createdBy != null"> + createdBy = #{record.createdBy, jdbcType=VARCHAR}, + </if> + <if test="record.lastUpdated != null"> + lastUpdated = #{record.lastUpdated, jdbcType=TIMESTAMP}, + </if> + <if test="record.lastUpdatedBy != null"> + lastUpdatedBy = #{record.lastUpdatedBy, jdbcType=VARCHAR}, + </if> + <if test="record.enable != null"> + enable = #{record.enable, jdbcType=BIT}, + </if> + <if test="record.deleted != null"> + deleted = #{record.deleted, jdbcType=BIT}, + </if> + <if test="record.userDef1 != null"> + userDef1 = #{record.userDef1, jdbcType=VARCHAR}, + </if> + <if test="record.userDef2 != null"> + userDef2 = #{record.userDef2, jdbcType=VARCHAR}, + </if> + <if test="record.userDef3 != null"> + userDef3 = #{record.userDef3, jdbcType=VARCHAR}, </if> </set> <where> <if test="condition.id != null"> AND id = #{condition.id} </if> - <if test="condition.warehouseId != null"> - AND warehouseId = #{condition.warehouseId} + <if test="condition.code != null"> + AND code = #{condition.code} + </if> + <if test="condition.parentId != null"> + AND parentId = #{condition.parentId} + </if> + <if test="condition.type != null"> + AND type = #{condition.type} + </if> + <if test="condition.name != null"> + AND name = #{condition.name} + </if> + <if test="condition.address1 != null"> + AND address1 = #{condition.address1} + </if> + <if test="condition.address2 != null"> + AND address2 = #{condition.address2} + </if> + <if test="condition.city != null"> + AND city = #{condition.city} + </if> + <if test="condition.province != null"> + AND province = #{condition.province} + </if> + <if test="condition.country != null"> + AND country = #{condition.country} + </if> + <if test="condition.postalCode != null"> + AND postalCode = #{condition.postalCode} + </if> + <if test="condition.attentionTo != null"> + AND attentionTo = #{condition.attentionTo} + </if> + <if test="condition.phoneNum != null"> + AND phoneNum = #{condition.phoneNum} + </if> + <if test="condition.mobile != null"> + AND mobile = #{condition.mobile} + </if> + <if test="condition.faxNum != null"> + AND faxNum = #{condition.faxNum} + </if> + <if test="condition.email != null"> + AND email = #{condition.email} </if> - <if test="condition.warehouseCode != null"> - AND warehouseCode = #{condition.warehouseCode} + <if test="condition.created != null"> + AND created = #{condition.created} </if> - <if test="condition.companyId != null"> - AND companyId = #{condition.companyId} + <if test="condition.createdBy != null"> + AND createdBy = #{condition.createdBy} </if> - <if test="condition.companyCode != null"> - AND companyCode = #{condition.companyCode} + <if test="condition.lastUpdated != null"> + AND lastUpdated = #{condition.lastUpdated} + </if> + <if test="condition.lastUpdatedBy != null"> + AND lastUpdatedBy = #{condition.lastUpdatedBy} + </if> + <if test="condition.enable != null"> + AND enable = #{condition.enable} + </if> + <if test="condition.deleted != null"> + AND deleted = #{condition.deleted} + </if> + <if test="condition.userDef1 != null"> + AND userDef1 = #{condition.userDef1} + </if> + <if test="condition.userDef2 != null"> + AND userDef2 = #{condition.userDef2} + </if> + <if test="condition.userDef3 != null"> + AND userDef3 = #{condition.userDef3} </if> </where> </update> <delete id="deleteById"> - DELETE FROM warehouse_company WHERE id = #{id, jdbcType=INTEGER} + DELETE FROM company WHERE id = #{id, jdbcType=INTEGER} </delete> <delete id="deleteByCondition"> - DELETE FROM warehouse_company + DELETE FROM company <where> <if test="id != null"> AND id = #{id} </if> - <if test="warehouseId != null"> - AND warehouseId = #{warehouseId} + <if test="code != null"> + AND code = #{code} + </if> + <if test="parentId != null"> + AND parentId = #{parentId} + </if> + <if test="type != null"> + AND type = #{type} + </if> + <if test="name != null"> + AND name = #{name} + </if> + <if test="address1 != null"> + AND address1 = #{address1} + </if> + <if test="address2 != null"> + AND address2 = #{address2} + </if> + <if test="city != null"> + AND city = #{city} + </if> + <if test="province != null"> + AND province = #{province} + </if> + <if test="country != null"> + AND country = #{country} + </if> + <if test="postalCode != null"> + AND postalCode = #{postalCode} + </if> + <if test="attentionTo != null"> + AND attentionTo = #{attentionTo} + </if> + <if test="phoneNum != null"> + AND phoneNum = #{phoneNum} + </if> + <if test="mobile != null"> + AND mobile = #{mobile} + </if> + <if test="faxNum != null"> + AND faxNum = #{faxNum} + </if> + <if test="email != null"> + AND email = #{email} + </if> + <if test="created != null"> + AND created = #{created} + </if> + <if test="createdBy != null"> + AND createdBy = #{createdBy} + </if> + <if test="lastUpdated != null"> + AND lastUpdated = #{lastUpdated} + </if> + <if test="lastUpdatedBy != null"> + AND lastUpdatedBy = #{lastUpdatedBy} + </if> + <if test="enable != null"> + AND enable = #{enable} + </if> + <if test="deleted != null"> + AND deleted = #{deleted} </if> - <if test="warehouseCode != null"> - AND warehouseCode = #{warehouseCode} + <if test="userDef1 != null"> + AND userDef1 = #{userDef1} </if> - <if test="companyId != null"> - AND companyId = #{companyId} + <if test="userDef2 != null"> + AND userDef2 = #{userDef2} </if> - <if test="companyCode != null"> - AND companyCode = #{companyCode} + <if test="userDef3 != null"> + AND userDef3 = #{userDef3} </if> </where> </delete> diff --git a/src/main/resources/mybatis/shipment/ShipmentDetailMapper.xml b/src/main/resources/mybatis/shipment/ShipmentDetailMapper.xml index f763b1d..58c6650 100644 --- a/src/main/resources/mybatis/shipment/ShipmentDetailMapper.xml +++ b/src/main/resources/mybatis/shipment/ShipmentDetailMapper.xml @@ -139,7 +139,7 @@ </select> <insert id="insertModel"> - INSERT INTO icsShipment_detail + INSERT INTO icsshipment_detail <trim prefix="(" suffix=")" suffixOverrides=","> <if test="cCode != null"> cCode, @@ -174,6 +174,9 @@ <if test="MoCode != null"> MoCode, </if> + <if test="MoDId != null"> + MoDId, + </if> <if test="SortSeq != null"> SortSeq, </if> @@ -231,9 +234,15 @@ <if test="iTrIds != null"> iTrIds, </if> - <if test="iMaIDs != null"> + <if test="iDLsID != null"> iDLsID, </if> + <if test="iArrsId != null"> + iArrsId, + </if> + <if test="iPOsID != null"> + iPOsID, + </if> </trim> <trim prefix=" values (" suffix=")" suffixOverrides=","> <if test="cCode != null"> @@ -266,6 +275,9 @@ <if test="MoId != null"> #{MoId, jdbcType=INTEGER}, </if> + <if test="MoDId != null"> + #{MoDId, jdbcType=INTEGER}, + </if> <if test="MoCode != null"> #{MoCode, jdbcType=VARCHAR}, </if> @@ -326,16 +338,22 @@ <if test="iTrIds != null"> #{iTrIds, jdbcType=INTEGER}, </if> - <if test="iMaIDs != null"> - #{iMaIDs, jdbcType=INTEGER}, + <if test="iDLsID != null"> + #{iDLsID, jdbcType=INTEGER}, + </if> + <if test="iArrsId != null"> + #{iArrsId, jdbcType=INTEGER}, + </if> + <if test="iPOsID != null"> + #{iPOsID, jdbcType=INTEGER}, </if> </trim> </insert> <select id="selectModel" resultType="com.huaheng.api.U8.domain.ICSShipmentDetail"> - SELECT cCode, ID, AutoID,irowno,cItemName, DLID, cSOCode, cSOID, cSOAutoID , MoId, MoDId,MoCode, SortSeq, cWHCode,cWHName,cInvCode,cInvName,cInvStd,iQuantity,cQuantity,cComUnitName,StartDate,DueDate,CompanyCode,cModifyDate,cMemo,iMaIDs, POCode, POID, PODID, iTrIds, iDLsID - from icsShipment_detail + SELECT cCode, ID, AutoID,irowno,cItemName, DLID, cSOCode, cSOID, cSOAutoID , MoId, MoDId,MoCode, SortSeq, cWHCode,cWHName,cInvCode,cInvName,cInvStd,iQuantity,cQuantity,cComUnitName,StartDate,DueDate,CompanyCode,cModifyDate,cMemo,iMaIDs, POCode, POID, PODID, iTrIds, iDLsID,iArrsId,iPOsID + from icsshipment_detail <where> <if test="cCode != null"> AND cCode = #{cCode} @@ -433,13 +451,19 @@ <if test="iDLsID != null"> AND iDLsID = #{iDLsID} </if> + <if test="iArrsId != null"> + AND iArrsId = #{iArrsId} + </if> + <if test="iPOsID != null"> + AND iPOsID = #{iPOsID} + </if> </where> - + LIMIT 1 </select> <select id="selectList" resultType="com.huaheng.api.U8.domain.ICSShipmentDetail"> - SELECT cCode, ID, AutoID,irowno,cItemName, DLID, cSOCode, cSOID, cSOAutoID , MoId, MoDId,MoCode, SortSeq, cWHCode,cWHName,cInvCode,cInvName,cInvStd,iQuantity,cQuantity,cComUnitName,StartDate,DueDate,CompanyCode,cModifyDate,cMemo,iMaIDs, POCode, POID, PODID, iTrIds, iDLsID - from icsShipment_detail + SELECT cCode, ID, AutoID,irowno,cItemName, DLID, cSOCode, cSOID, cSOAutoID , MoId, MoDId,MoCode, SortSeq, cWHCode,cWHName,cInvCode,cInvName,cInvStd,iQuantity,cQuantity,cComUnitName,StartDate,DueDate,CompanyCode,cModifyDate,cMemo,iMaIDs, POCode, POID, PODID, iTrIds, iDLsID,iPOsID,iArrsId + from icsshipment_detail <where> <if test="cCode != null"> AND cCode = #{cCode} @@ -537,6 +561,12 @@ <if test="iDLsID != null"> AND iDLsID = #{iDLsID} </if> + <if test="iArrsId != null"> + AND iArrsId = #{iArrsId} + </if> + <if test="iPOsID != null"> + AND iPOsID = #{iPOsID} + </if> </where> </select> diff --git a/src/main/resources/mybatis/shipment/ShipmentHeaderMapper.xml b/src/main/resources/mybatis/shipment/ShipmentHeaderMapper.xml index f0eb5c6..2759aa2 100644 --- a/src/main/resources/mybatis/shipment/ShipmentHeaderMapper.xml +++ b/src/main/resources/mybatis/shipment/ShipmentHeaderMapper.xml @@ -73,8 +73,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <select id="selectModel" resultType="com.huaheng.api.U8.domain.ICSShipmentHeader"> - SELECT cCode, ID, dPODate, cVenCode, cVenName, cBusType, cDepCode, cDepName, cPersonCode, cPersonName, cMemo, cMaker, cVerifier, CompanyCode, cModifyDate,cTVCode, dDate, cRDName, cWHCode, cWHName,oWHCode, oWHName, MoId, MoCode, DLID, cDLCode, cCusCode, cCusName, cSTName - from icsShipment_header + SELECT cCode, ID, dPODate, cVenCode, cVenName, cBusType, cDepCode, cDepName, cPersonCode, cPersonName, cMemo, cMaker, type, cVerifier, CompanyCode, cModifyDate,cTVCode, dDate, cRDName, cWHCode, cWHName,oWHCode, oWHName, MoId, MoCode, DLID, cDLCode, cCusCode, cCusName, cSTName + from icsshipment_header <where> <if test="cCode != null"> AND cCode = #{cCode} @@ -163,6 +163,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <if test="cSTName != null"> AND cSTName = #{cSTName} </if> + <if test="type != null"> + AND type = #{type} + </if> </where> </select> @@ -170,7 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <insert id="insertModel"> - INSERT INTO icsShipment_header + INSERT INTO icsshipment_header <trim prefix="(" suffix=")" suffixOverrides=","> <if test="cCode != null"> cCode, @@ -259,6 +262,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <if test="cSTName != null"> cSTName, </if> + <if test="type != null"> + type, + </if> </trim> <trim prefix=" values (" suffix=")" suffixOverrides=","> <if test="cCode != null"> @@ -348,6 +354,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <if test="cSTName != null"> #{cSTName, jdbcType=VARCHAR}, </if> + <if test="type != null"> + #{type, jdbcType=VARCHAR}, + </if> </trim> </insert> </mapper> \ No newline at end of file diff --git a/src/main/resources/mybatis/shipment/ShipmentHeaderMapperAuto.xml b/src/main/resources/mybatis/shipment/ShipmentHeaderMapperAuto.xml index 0cc7e26..a71bbbd 100644 --- a/src/main/resources/mybatis/shipment/ShipmentHeaderMapperAuto.xml +++ b/src/main/resources/mybatis/shipment/ShipmentHeaderMapperAuto.xml @@ -52,9 +52,8 @@ <if test="priority != null "> AND priority = #{priority} </if> - <if test="station != null and station != ''"> - <bind name="stationPattern" value="'%' + station + '%'" /> - AND station like #{stationPattern} + <if test="station != null "> + AND station = #{station} </if> <if test="totalQty != null "> AND totalQty = #{totalQty} @@ -695,7 +694,7 @@ #{priority, jdbcType=SMALLINT}, </if> <if test="station != null"> - #{station, jdbcType=VARCHAR}, + #{station, jdbcType=INTEGER}, </if> <if test="totalQty != null"> #{totalQty, jdbcType=DECIMAL}, @@ -788,7 +787,7 @@ priority = #{priority, jdbcType=SMALLINT}, </if> <if test="station != null"> - station = #{station, jdbcType=VARCHAR}, + station = #{station, jdbcType=INTEGER}, </if> <if test="totalQty != null"> totalQty = #{totalQty, jdbcType=DECIMAL}, @@ -882,7 +881,7 @@ priority = #{record.priority, jdbcType=SMALLINT}, </if> <if test="record.station != null"> - station = #{record.station, jdbcType=VARCHAR}, + station = #{record.station, jdbcType=INTEGER}, </if> <if test="record.totalQty != null"> totalQty = #{record.totalQty, jdbcType=DECIMAL}, diff --git a/src/main/resources/templates/general/location/addBatch.html b/src/main/resources/templates/general/location/addBatch.html new file mode 100644 index 0000000..a2bc1de --- /dev/null +++ b/src/main/resources/templates/general/location/addBatch.html @@ -0,0 +1,117 @@ +<!DOCTYPE HTML> +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> +<meta charset="utf-8"> +<head th:include="include :: header"></head> +<body class="white-bg"> + <div class="wrapper wrapper-content animated fadeInRight ibox-content"> + <form class="form-horizontal m" id="form-location-add"> + <div class="form-group"> + <label class="col-sm-3 control-label">最后行:</label> + <div class="col-sm-8"> + <input id="row" name="row" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">最后列:</label> + <div class="col-sm-8"> + <input id="line" name="line" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">最后层:</label> + <div class="col-sm-8"> + <input id="layer" name="layer" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">最后格:</label> + <div class="col-sm-8"> + <input id="grid" name="grid" class="form-control" type="text"> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">库位类型:</label> + <div class="col-sm-8"> + <select id="type" class="form-control" th:with="locationType=${@locationType.getLocationPrefix()}"> + <option th:each="item : ${locationType}" th:text="${item['name']}" th:value="${item['prefix']}"></option> + </select> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">库区编码:</label> + <div class="col-sm-8"> + <select id="zone" name="zone" class="form-control" th:with="zone=${@zone.getZoneCodeList()}"> + <option th:each="item : ${zone}" th:text="${item['name']}" th:value="${item['id']}" th:attr = " code = ${item['code']}"></option> + </select> + </div> + </div> + <div class="form-group"> + <label class="col-sm-3 control-label">是否有效:</label> + <div class="col-sm-8"> + <div class="onoffswitch"> + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable"> + <label class="onoffswitch-label" for="enable"> + <span class="onoffswitch-inner"></span> + <span class="onoffswitch-switch"></span> + </label> + </div> + </div> + </div> + <div class="form-group"> + <div class="form-control-static col-sm-offset-9"> + <button type="submit" class="btn btn-primary">提交</button> + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> + </div> + </div> + </form> + </div> + <div th:include="include::footer"></div> + <script type="text/javascript"> + var prefix = ctx + "general/location" + $("#form-location-add").validate({ + rules:{ + row:{ + required:true, + digits:true + }, + line:{ + required:true, + digits:true + }, + layer:{ + required:true, + digits:true + }, + grid:{ + required:true, + digits:true + } + }, + submitHandler: function(form) { + $.ajax({ + cache : true, + type : "POST", + url : prefix + "/addBatchSave", + data : { + "row": $("input[name='row']").val(), + "line": $("input[name='line']").val(), + "layer": $("input[name='layer']").val(), + "grid": $("input[name='grid']").val(), + "type": $("#type option:selected").val(), + "zoneId":$("#zone option:selected").val(), + "zoneCode": $("#zone option:selected").attr("code"), + "enable" : $("input[name='enable']").is(':checked'), + }, + async : false, + error : function(request) { + $.modal.alertError("请求失败!"); + }, + success : function(data) { + $.operate.saveSuccess(data); + } + }); + } + }); + </script> +</body> +</html> diff --git a/src/main/resources/templates/general/location/location.html b/src/main/resources/templates/general/location/location.html index b2cfe08..79cc3a8 100644 --- a/src/main/resources/templates/general/location/location.html +++ b/src/main/resources/templates/general/location/location.html @@ -66,6 +66,10 @@ </a> <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="general:location:remove"> + <a class="btn btn-outline btn-success btn-rounded" onclick="addBatch()" shiro:hasPermission="general:location:add"> + <i class="fa fa-plus"></i> 批量新增 + </a> + <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="general:location:remove"> <i class="fa fa-trash-o"></i> 删除 </a> </div> @@ -235,6 +239,11 @@ }; $.table.init(options); }); + + + function addBatch() { + $.modal.open("批量添加", prefix + "/addBatch"); + } </script> </body> </html> \ No newline at end of file diff --git a/src/test/java/com.huaheng.test/CreateCode.java b/src/test/java/com.huaheng.test/CreateCode.java index d6eff4c..810e7e1 100644 --- a/src/test/java/com.huaheng.test/CreateCode.java +++ b/src/test/java/com.huaheng.test/CreateCode.java @@ -187,7 +187,8 @@ public class CreateCode { if (packageName == null) continue; directory = "src/main/resources/mybatis/" + packageName.split("\\.")[3]; - modelName = FirstCharToUpper(packageName.split("\\.")[4]); + modelName = packageName.split("\\.")[5]; + packageName = packageName.substring(0, packageName.lastIndexOf(".")); for(Map<String, Object> columnMap : columnList) if (columnMap.get("TABLE_NAME").equals(tableName)) @@ -1149,33 +1150,33 @@ public class CreateCode { private static Map<String, String> getPackages() { Map<String, String> packages = new HashMap<String, String>(); - packages.put("company","com.huaheng.pc.general.company"); - packages.put("warehouse_company","com.huaheng.pc.general.company"); - packages.put("container","com.huaheng.pc.general.container"); - packages.put("container_type","com.huaheng.pc.config.containerType"); - packages.put("customer","com.huaheng.pc.general.customer"); - packages.put("cyclecount_adjust","com.huaheng.pc.inventory.cyclecountAdjust"); - packages.put("cyclecount_adjustdetail","com.huaheng.pc.inventory.cyclecountAdjustDetail"); - packages.put("cyclecount_detail","com.huaheng.pc.inventory.cyclecountDetail"); - packages.put("cyclecount_header","com.huaheng.pc.inventory.cyclecountHeader"); - packages.put("inventory","com.huaheng.pc.inventory.inventory"); - packages.put("inventory_transaction","com.huaheng.pc.inventory.inventoryTransaction"); - packages.put("location","com.huaheng.pc.general.location"); - packages.put("location_type","com.huaheng.pc.config.locationType"); - packages.put("material","com.huaheng.pc.general.material"); - packages.put("receipt_container_detail","com.huaheng.pc.receipt.receiptContainerDetail"); - packages.put("receipt_container_header","com.huaheng.pc.receipt.receiptContainerHeader"); - packages.put("receipt_detail","com.huaheng.pc.receipt.receiptDetail"); - packages.put("receipt_detail_history","com.huaheng.pc.receipt.receiptDetailHistory"); - packages.put("receipt_header","com.huaheng.pc.receipt.receiptHeader"); - packages.put("receipt_header_history","com.huaheng.pc.receipt.receiptHeaderHistory"); - packages.put("shipment_container_detail","com.huaheng.pc.shipment.shipmentContainerDetail"); - packages.put("shipment_container_header","com.huaheng.pc.shipment.shipmentContainerHeader"); - packages.put("shipment_detail","com.huaheng.pc.shipment.shipmentDetail"); - packages.put("shipment_detail_history","com.huaheng.pc.shipment.shipmentDetailHistory"); - packages.put("shipment_header","com.huaheng.pc.shipment.shipmentHeader"); - packages.put("shipment_header_history","com.huaheng.pc.shipment.shipmentHeaderHistory"); - packages.put("supplier","com.huaheng.pc.general.supplier"); + packages.put("company","com.huaheng.pc.general.company.Company"); + packages.put("warehouse_company","com.huaheng.pc.general.company.WarehouseCompany"); + packages.put("container","com.huaheng.pc.general.container.Container"); + packages.put("container_type","com.huaheng.pc.config.containerType.ContainerType"); + packages.put("customer","com.huaheng.pc.general.customer.Customer"); + packages.put("cyclecount_adjust","com.huaheng.pc.inventory.cyclecountAdjust.CyclecountAdjust"); + packages.put("cyclecount_adjustdetail","com.huaheng.pc.inventory.cyclecountAdjustDetail.CyclecountAdjustDetail"); + packages.put("cyclecount_detail","com.huaheng.pc.inventory.cyclecountDetail.CyclecountDetail"); + packages.put("cyclecount_header","com.huaheng.pc.inventory.cyclecountHeader.CyclecountHeader"); + packages.put("inventory","com.huaheng.pc.inventory.inventory.Inventory"); + packages.put("inventory_transaction","com.huaheng.pc.inventory.inventoryTransaction.InventoryTransaction"); + packages.put("location","com.huaheng.pc.general.location.Location"); + packages.put("location_type","com.huaheng.pc.config.locationType.LocationType"); + packages.put("material","com.huaheng.pc.general.material.Material"); + packages.put("receipt_container_detail","com.huaheng.pc.receipt.receiptContainerDetail.ReceiptContainerDetail"); + packages.put("receipt_container_header","com.huaheng.pc.receipt.receiptContainerHeader.ReceiptContainerHeader"); + packages.put("receipt_detail","com.huaheng.pc.receipt.receiptDetail.ReceiptDetail"); + packages.put("receipt_detail_history","com.huaheng.pc.receipt.receiptDetailHistory.ReceiptDetailHistory"); + packages.put("receipt_header","com.huaheng.pc.receipt.receiptHeader.ReceiptHeader"); + packages.put("receipt_header_history","com.huaheng.pc.receipt.receiptHeaderHistory.ReceiptHeaderHistory"); + packages.put("shipment_container_detail","com.huaheng.pc.shipment.shipmentContainerDetail.ShipmentContainerDetail"); + packages.put("shipment_container_header","com.huaheng.pc.shipment.shipmentContainerHeader.ShipmentContainerHeader"); + packages.put("shipment_detail","com.huaheng.pc.shipment.shipmentDetail.ShipmentDetail"); + packages.put("shipment_detail_history","com.huaheng.pc.shipment.shipmentDetailHistory.ShipmentDetailHistory"); + packages.put("shipment_header","com.huaheng.pc.shipment.shipmentHeader.ShipmentHeader"); + packages.put("shipment_header_history","com.huaheng.pc.shipment.shipmentHeaderHistory.ShipmentHeaderHistory"); + packages.put("supplier","com.huaheng.pc.general.supplier.Supplier"); // packages.put("sys_config","system"); // packages.put("sys_dept","system"); // packages.put("sys_dict_data","system"); @@ -1192,11 +1193,11 @@ public class CreateCode { // packages.put("sys_user_company","system"); // packages.put("sys_user_online","system"); // packages.put("sys_user_role","system"); - packages.put("task","com.huaheng.pc.task.task"); - packages.put("task_detail","com.huaheng.pc.task.taskDetail"); - packages.put("warehouse","com.huaheng.pc.general.warehouse"); - packages.put("zone","com.huaheng.pc.config.zone"); - packages.put("zone_capacity","com.huaheng.pc.config.zoneCapacity"); + packages.put("task","com.huaheng.pc.task.task.Task"); + packages.put("task_detail","com.huaheng.pc.task.taskDetail.TaskDetail"); + packages.put("warehouse","com.huaheng.pc.general.warehouse.Warehouse"); + packages.put("zone","com.huaheng.pc.config.zone.Zone"); + packages.put("zone_capacity","com.huaheng.pc.config.zoneCapacity.ZoneCapacity"); return packages; }