From 3d2401cf8ea9ae3d830c0568e7751e2e8cc8db22 Mon Sep 17 00:00:00 2001 From: 懒羊羊 <15939171744@163.com> Date: 星期二, 19 九月 2023 11:21:37 +0800 Subject: [PATCH] 工位设备客户基础表 --- guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/service/CustomInfoService.java | 69 guns-vip-main/src/main/webapp/assets/modular/bs/locationInfo/locationInfo.js | 156 ++ guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/service/EquipmentInfoService.java | 69 guns-vip-main/src/main/sqls/equipmentInfo_menus.sql | 4 guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/entity/LocationInfo.java | 225 +++ guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/controller/CustomInfoController.java | 143 ++ guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/service/impl/CustomInfoServiceImpl.java | 84 + guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/mapper/mapping/LocationInfoMapper.xml | 112 + guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/model/params/CustomInfoParam.java | 78 + guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/controller/LocationInfoController.java | 136 + guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/entity/CustomInfo.java | 180 ++ guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/mapper/mapping/EquipmentInfoMapper.xml | 72 + guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/model/result/CustomInfoResult.java | 72 + guns-vip-main/src/main/webapp/assets/modular/bs/equipmentInfo/equipmentInfo.js | 141 ++ guns-vip-main/src/main/webapp/pages/modular/bs/locationInfo/locationInfo_edit.html | 64 guns-vip-main/src/main/webapp/assets/modular/bs/equipmentInfo/equipmentInfo_add.js | 103 + guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/model/params/LocationInfoParam.java | 93 + guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/model/result/LocationInfoResult.java | 87 + guns-vip-main/src/main/webapp/pages/modular/bs/locationInfo/locationInfo_add.html | 64 guns-vip-main/src/main/sqls/locationInfo_menus.sql | 4 guns-vip-main/src/main/webapp/assets/modular/bs/customInfo/customInfo.js | 136 + guns-vip-main/src/main/webapp/assets/modular/bs/locationInfo/locationInfo_edit.js | 111 + guns-vip-main/src/main/webapp/assets/modular/bs/customInfo/customInfo_edit.js | 63 guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/service/impl/LocationInfoServiceImpl.java | 84 + guns-vip-main/src/main/webapp/pages/modular/bs/equipmentInfo/equipmentInfo_add.html | 82 + guns-vip-main/src/main/webapp/pages/modular/bs/locationInfo/locationInfo.html | 65 guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/mapper/mapping/CustomInfoMapper.xml | 85 + guns-vip-main/src/main/webapp/pages/modular/bs/customInfo/customInfo_add.html | 52 guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/model/result/EquipmentInfoResult.java | 112 + guns-vip-main/src/main/webapp/pages/modular/bs/customInfo/customInfo_edit.html | 52 guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/mapper/LocationInfoMapper.java | 56 guns-vip-main/src/main/sqls/customInfo_menus.sql | 4 guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/service/impl/EquipmentInfoServiceImpl.java | 84 + guns-vip-main/src/main/webapp/assets/modular/bs/equipmentInfo/equipmentInfo_edit.js | 130 + guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/entity/EquipmentInfo.java | 300 ++++ guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/service/LocationInfoService.java | 69 guns-vip-main/src/main/webapp/pages/modular/bs/customInfo/customInfo.html | 50 guns-vip-main/src/main/webapp/pages/modular/bs/equipmentInfo/equipmentInfo.html | 62 guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/controller/EquipmentInfoController.java | 136 + guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/mapper/EquipmentInfoMapper.java | 56 guns-vip-main/src/main/webapp/pages/modular/bs/equipmentInfo/equipmentInfo_edit.html | 82 + guns-vip-main/src/main/webapp/assets/modular/bs/customInfo/customInfo_add.js | 59 guns-vip-main/src/main/webapp/assets/modular/bs/locationInfo/locationInfo_add.js | 94 + guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/mapper/CustomInfoMapper.java | 56 guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/model/params/EquipmentInfoParam.java | 118 + 45 files changed, 4,154 insertions(+), 0 deletions(-) diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/controller/CustomInfoController.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/controller/CustomInfoController.java new file mode 100644 index 0000000..02d43fb --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/controller/CustomInfoController.java @@ -0,0 +1,143 @@ +package cn.stylefeng.guns.modular.zsx.bs.custom.controller; + +import cn.hutool.log.Log; +import cn.stylefeng.guns.base.auth.context.LoginContextHolder; +import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; +import cn.stylefeng.guns.modular.zsx.bs.custom.entity.CustomInfo; +import cn.stylefeng.guns.modular.zsx.bs.custom.model.params.CustomInfoParam; +import cn.stylefeng.guns.modular.zsx.bs.custom.service.CustomInfoService; +import cn.stylefeng.roses.core.base.controller.BaseController; +import cn.stylefeng.roses.kernel.model.response.ResponseData; +import cn.stylefeng.roses.core.mutidatasource.annotion.DataSource; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.Date; + + +/** + * 瀹㈡埛淇℃伅鎺у埗鍣� + * + * @author ruimin + * @Date 2023-09-18 15:38:50 + */ +@Controller +@RequestMapping("/customInfo") +public class CustomInfoController extends BaseController { + + private String PREFIX = "/modular/bs/customInfo"; + + @Autowired + private CustomInfoService customInfoService; + + /** + * 璺宠浆鍒颁富椤甸潰 + * + * @author ruimin + * @Date 2023-09-18 + */ + @RequestMapping("") + public String index() { + return PREFIX + "/customInfo.html"; + } + + /** + * 鏂板椤甸潰 + * + * @author ruimin + * @Date 2023-09-18 + */ + @RequestMapping("/add") + public String add() { + return PREFIX + "/customInfo_add.html"; + } + + /** + * 缂栬緫椤甸潰 + * + * @author ruimin + * @Date 2023-09-18 + */ + @RequestMapping("/edit") + public String edit() { + return PREFIX + "/customInfo_edit.html"; + } + + /** + * 鏂板鎺ュ彛 + * + * @author ruimin + * @Date 2023-09-18 + */ + @RequestMapping("/addItem") + @ResponseBody + @DataSource(name = "self") + public ResponseData addItem(CustomInfoParam customInfoParam) { + customInfoParam.setCreateTime(new Date()); + customInfoParam.setCreateUser(LoginContextHolder.getContext().getUser().getName()); + this.customInfoService.add(customInfoParam); + return ResponseData.success(); + } + + /** + * 缂栬緫鎺ュ彛 + * + * @author ruimin + * @Date 2023-09-18 + */ + @RequestMapping("/editItem") + @ResponseBody + @DataSource(name = "self") + public ResponseData editItem(CustomInfoParam customInfoParam) { + customInfoParam.setUpdateTime(new Date()); + customInfoParam.setUpdateUser(LoginContextHolder.getContext().getUser().getName()); + this.customInfoService.update(customInfoParam); + return ResponseData.success(); + } + + /** + * 鍒犻櫎鎺ュ彛 + * + * @author ruimin + * @Date 2023-09-18 + */ + @RequestMapping("/delete") + @ResponseBody + @DataSource(name = "self") + public ResponseData delete(CustomInfoParam customInfoParam) { + this.customInfoService.delete(customInfoParam); + return ResponseData.success(); + } + + /** + * 鏌ョ湅璇︽儏鎺ュ彛 + * + * @author ruimin + * @Date 2023-09-18 + */ + @RequestMapping("/detail") + @ResponseBody + @DataSource(name = "self") + public ResponseData detail(CustomInfoParam customInfoParam) { + CustomInfo detail = this.customInfoService.getById(customInfoParam.getId()); + return ResponseData.success(detail); + } + + /** + * 鏌ヨ鍒楄〃 + * + * @author ruimin + * @Date 2023-09-18 + */ + @ResponseBody + @RequestMapping("/list") + @DataSource(name = "self") + public LayuiPageInfo list(CustomInfoParam customInfoParam) { + return this.customInfoService.findPageBySpec(customInfoParam); + } + +} + + diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/entity/CustomInfo.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/entity/CustomInfo.java new file mode 100644 index 0000000..95dd2be --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/entity/CustomInfo.java @@ -0,0 +1,180 @@ +package cn.stylefeng.guns.modular.zsx.bs.custom.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import java.io.Serializable; + +/** + * <p> + * 瀹㈡埛淇℃伅 + * </p> + * + * @author ruimin + * @since 2023-09-18 + */ +@TableName("bs_custom_info") +public class CustomInfo implements Serializable { + + private static final long serialVersionUID=1L; + + /** + * id + */ + @TableId(value = "id", type = IdType.ID_WORKER) + private Long id; + + /** + * 瀹㈡埛缂栧彿 + */ + @TableField("customer_code") + private String customerCode; + + /** + * 瀹㈡埛鍚嶇О + */ + @TableField("customer_name") + private String customerName; + + /** + * 瀹㈡埛绫诲瀷 + */ + @TableField("customer_type") + private String customerType; + + /** + * 鑱旂郴鏂瑰紡 + */ + @TableField("contact") + private String contact; + + /** + * 澶囨敞 + */ + @TableField("remarks") + private String remarks; + + /** + * 鍒涘缓鏃堕棿 + */ + @TableField(value = "create_time", fill = FieldFill.INSERT) + private Date createTime; + + /** + * 鍒涘缓鐢ㄦ埛 + */ + @TableField(value = "create_user", fill = FieldFill.INSERT) + private String createUser; + + /** + * 淇敼鏃堕棿 + */ + @TableField(value = "update_time", fill = FieldFill.UPDATE) + private Date updateTime; + + /** + * 淇敼鐢ㄦ埛 + */ + @TableField(value = "update_user", fill = FieldFill.UPDATE) + private String updateUser; + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCustomerCode() { + return customerCode; + } + + public void setCustomerCode(String customerCode) { + this.customerCode = customerCode; + } + + public String getCustomerName() { + return customerName; + } + + public void setCustomerName(String customerName) { + this.customerName = customerName; + } + + public String getCustomerType() { + return customerType; + } + + public void setCustomerType(String customerType) { + this.customerType = customerType; + } + + public String getContact() { + return contact; + } + + public void setContact(String contact) { + this.contact = contact; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getUpdateUser() { + return updateUser; + } + + public void setUpdateUser(String updateUser) { + this.updateUser = updateUser; + } + + @Override + public String toString() { + return "CustomInfo{" + + "id=" + id + + ", customerCode=" + customerCode + + ", customerName=" + customerName + + ", customerType=" + customerType + + ", contact=" + contact + + ", remarks=" + remarks + + ", createTime=" + createTime + + ", createUser=" + createUser + + ", updateTime=" + updateTime + + ", updateUser=" + updateUser + + "}"; + } +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/mapper/CustomInfoMapper.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/mapper/CustomInfoMapper.java new file mode 100644 index 0000000..acb4c78 --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/mapper/CustomInfoMapper.java @@ -0,0 +1,56 @@ +package cn.stylefeng.guns.modular.zsx.bs.custom.mapper; + +import cn.stylefeng.guns.modular.zsx.bs.custom.entity.CustomInfo; +import cn.stylefeng.guns.modular.zsx.bs.custom.model.params.CustomInfoParam; +import cn.stylefeng.guns.modular.zsx.bs.custom.model.result.CustomInfoResult; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * <p> + * 瀹㈡埛淇℃伅 Mapper 鎺ュ彛 + * </p> + * + * @author ruimin + * @since 2023-09-18 + */ +public interface CustomInfoMapper extends BaseMapper<CustomInfo> { + + /** + * 鑾峰彇鍒楄〃 + * + * @author ruimin + * @Date 2023-09-18 + */ + List<CustomInfoResult> customList(@Param("paramCondition") CustomInfoParam paramCondition); + + /** + * 鑾峰彇map鍒楄〃 + * + * @author ruimin + * @Date 2023-09-18 + */ + List<Map<String, Object>> customMapList(@Param("paramCondition") CustomInfoParam paramCondition); + + /** + * 鑾峰彇鍒嗛〉瀹炰綋鍒楄〃 + * + * @author ruimin + * @Date 2023-09-18 + */ + Page<CustomInfoResult> customPageList(@Param("page") Page page, @Param("paramCondition") CustomInfoParam paramCondition); + + /** + * 鑾峰彇鍒嗛〉map鍒楄〃 + * + * @author ruimin + * @Date 2023-09-18 + */ + Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") CustomInfoParam paramCondition); + +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/mapper/mapping/CustomInfoMapper.xml b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/mapper/mapping/CustomInfoMapper.xml new file mode 100644 index 0000000..11c3e55 --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/mapper/mapping/CustomInfoMapper.xml @@ -0,0 +1,85 @@ +<?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"> +<mapper namespace="cn.stylefeng.guns.modular.zsx.bs.custom.mapper.CustomInfoMapper"> + + <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> + <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.zsx.bs.custom.entity.CustomInfo"> + <id column="id" property="id" /> + <result column="customer_code" property="customerCode" /> + <result column="customer_name" property="customerName" /> + <result column="customer_type" property="customerType" /> + <result column="contact" property="contact" /> + <result column="remarks" property="remarks" /> + <result column="create_time" property="createTime" /> + <result column="create_user" property="createUser" /> + <result column="update_time" property="updateTime" /> + <result column="update_user" property="updateUser" /> + </resultMap> + + <!-- 閫氱敤鏌ヨ缁撴灉鍒� --> + <sql id="Base_Column_List"> + id AS "id", customer_code AS "customerCode", customer_name AS "customerName", customer_type AS "customerType", contact AS "contact", remarks AS "remarks", create_time AS "createTime", create_user AS "createUser", update_time AS "updateTime", update_user AS "updateUser" + </sql> + + + <select id="customList" resultType="cn.stylefeng.guns.modular.zsx.bs.custom.model.result.CustomInfoResult" parameterType="cn.stylefeng.guns.modular.zsx.bs.custom.model.params.CustomInfoParam"> + select + <include refid="Base_Column_List"/> + from bs_custom_info where 1 = 1 + <if test="paramCondition.customerCode != null and paramCondition.customerCode != ''"> + and customer_code like CONCAT('%',#{paramCondition.customerCode},'%') + </if> + <if test="paramCondition.customerName != null and paramCondition.customerName != ''"> + and customer_name like CONCAT('%',#{paramCondition.customerName},'%') + </if> + <if test="paramCondition.customerType != null and paramCondition.customerType != ''"> + and customer_type like CONCAT('%',#{paramCondition.customerType},'%') + </if> + </select> + + <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.bs.custom.model.params.CustomInfoParam"> + select + <include refid="Base_Column_List"/> + from bs_custom_info where 1 = 1 + <if test="paramCondition.customerCode != null and paramCondition.customerCode != ''"> + and customer_code like CONCAT('%',#{paramCondition.customerCode},'%') + </if> + <if test="paramCondition.customerName != null and paramCondition.customerName != ''"> + and customer_name like CONCAT('%',#{paramCondition.customerName},'%') + </if> + <if test="paramCondition.customerType != null and paramCondition.customerType != ''"> + and customer_type like CONCAT('%',#{paramCondition.customerType},'%') + </if> + </select> + + <select id="customPageList" resultType="cn.stylefeng.guns.modular.zsx.bs.custom.model.result.CustomInfoResult" parameterType="cn.stylefeng.guns.modular.zsx.bs.custom.model.params.CustomInfoParam"> + select + <include refid="Base_Column_List"/> + from bs_custom_info where 1 = 1 + <if test="paramCondition.customerCode != null and paramCondition.customerCode != ''"> + and customer_code like CONCAT('%',#{paramCondition.customerCode},'%') + </if> + <if test="paramCondition.customerName != null and paramCondition.customerName != ''"> + and customer_name like CONCAT('%',#{paramCondition.customerName},'%') + </if> + <if test="paramCondition.customerType != null and paramCondition.customerType != ''"> + and customer_type like CONCAT('%',#{paramCondition.customerType},'%') + </if> + </select> + + <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.bs.custom.model.params.CustomInfoParam"> + select + <include refid="Base_Column_List"/> + from bs_custom_info where 1 = 1 + <if test="paramCondition.customerCode != null and paramCondition.customerCode != ''"> + and customer_code like CONCAT('%',#{paramCondition.customerCode},'%') + </if> + <if test="paramCondition.customerName != null and paramCondition.customerName != ''"> + and customer_name like CONCAT('%',#{paramCondition.customerName},'%') + </if> + <if test="paramCondition.customerType != null and paramCondition.customerType != ''"> + and customer_type like CONCAT('%',#{paramCondition.customerType},'%') + </if> + </select> + +</mapper> diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/model/params/CustomInfoParam.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/model/params/CustomInfoParam.java new file mode 100644 index 0000000..83156a5 --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/model/params/CustomInfoParam.java @@ -0,0 +1,78 @@ +package cn.stylefeng.guns.modular.zsx.bs.custom.model.params; + +import lombok.Data; +import cn.stylefeng.roses.kernel.model.validator.BaseValidatingParam; +import java.util.Date; +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * <p> + * 瀹㈡埛淇℃伅 + * </p> + * + * @author ruimin + * @since 2023-09-18 + */ +@Data +public class CustomInfoParam implements Serializable, BaseValidatingParam { + + private static final long serialVersionUID = 1L; + + + /** + * id + */ + private Long id; + + /** + * 瀹㈡埛缂栧彿 + */ + private String customerCode; + + /** + * 瀹㈡埛鍚嶇О + */ + private String customerName; + + /** + * 瀹㈡埛绫诲瀷 + */ + private String customerType; + + /** + * 鑱旂郴鏂瑰紡 + */ + private String contact; + + /** + * 澶囨敞 + */ + private String remarks; + + /** + * 鍒涘缓鏃堕棿 + */ + private Date createTime; + + /** + * 鍒涘缓鐢ㄦ埛 + */ + private String createUser; + + /** + * 淇敼鏃堕棿 + */ + private Date updateTime; + + /** + * 淇敼鐢ㄦ埛 + */ + private String updateUser; + + @Override + public String checkParam() { + return null; + } + +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/model/result/CustomInfoResult.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/model/result/CustomInfoResult.java new file mode 100644 index 0000000..34d9fd7 --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/model/result/CustomInfoResult.java @@ -0,0 +1,72 @@ +package cn.stylefeng.guns.modular.zsx.bs.custom.model.result; + +import lombok.Data; +import java.util.Date; +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * <p> + * 瀹㈡埛淇℃伅 + * </p> + * + * @author ruimin + * @since 2023-09-18 + */ +@Data +public class CustomInfoResult implements Serializable { + + private static final long serialVersionUID = 1L; + + + /** + * id + */ + private Long id; + + /** + * 瀹㈡埛缂栧彿 + */ + private String customerCode; + + /** + * 瀹㈡埛鍚嶇О + */ + private String customerName; + + /** + * 瀹㈡埛绫诲瀷 + */ + private String customerType; + + /** + * 鑱旂郴鏂瑰紡 + */ + private String contact; + + /** + * 澶囨敞 + */ + private String remarks; + + /** + * 鍒涘缓鏃堕棿 + */ + private Date createTime; + + /** + * 鍒涘缓鐢ㄦ埛 + */ + private String createUser; + + /** + * 淇敼鏃堕棿 + */ + private Date updateTime; + + /** + * 淇敼鐢ㄦ埛 + */ + private String updateUser; + +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/service/CustomInfoService.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/service/CustomInfoService.java new file mode 100644 index 0000000..f5258c1 --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/service/CustomInfoService.java @@ -0,0 +1,69 @@ +package cn.stylefeng.guns.modular.zsx.bs.custom.service; + +import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; +import cn.stylefeng.guns.modular.zsx.bs.custom.entity.CustomInfo; +import cn.stylefeng.guns.modular.zsx.bs.custom.model.params.CustomInfoParam; +import cn.stylefeng.guns.modular.zsx.bs.custom.model.result.CustomInfoResult; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + * <p> + * 瀹㈡埛淇℃伅 鏈嶅姟绫� + * </p> + * + * @author ruimin + * @since 2023-09-18 + */ +public interface CustomInfoService extends IService<CustomInfo> { + + /** + * 鏂板 + * + * @author ruimin + * @Date 2023-09-18 + */ + void add(CustomInfoParam param); + + /** + * 鍒犻櫎 + * + * @author ruimin + * @Date 2023-09-18 + */ + void delete(CustomInfoParam param); + + /** + * 鏇存柊 + * + * @author ruimin + * @Date 2023-09-18 + */ + void update(CustomInfoParam param); + + /** + * 鏌ヨ鍗曟潯鏁版嵁锛孲pecification妯″紡 + * + * @author ruimin + * @Date 2023-09-18 + */ + CustomInfoResult findBySpec(CustomInfoParam param); + + /** + * 鏌ヨ鍒楄〃锛孲pecification妯″紡 + * + * @author ruimin + * @Date 2023-09-18 + */ + List<CustomInfoResult> findListBySpec(CustomInfoParam param); + + /** + * 鏌ヨ鍒嗛〉鏁版嵁锛孲pecification妯″紡 + * + * @author ruimin + * @Date 2023-09-18 + */ + LayuiPageInfo findPageBySpec(CustomInfoParam param); + +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/service/impl/CustomInfoServiceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/service/impl/CustomInfoServiceImpl.java new file mode 100644 index 0000000..722b912 --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/custom/service/impl/CustomInfoServiceImpl.java @@ -0,0 +1,84 @@ +package cn.stylefeng.guns.modular.zsx.bs.custom.service.impl; + +import cn.stylefeng.guns.base.pojo.page.LayuiPageFactory; +import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; +import cn.stylefeng.guns.modular.zsx.bs.custom.entity.CustomInfo; +import cn.stylefeng.guns.modular.zsx.bs.custom.mapper.CustomInfoMapper; +import cn.stylefeng.guns.modular.zsx.bs.custom.model.params.CustomInfoParam; +import cn.stylefeng.guns.modular.zsx.bs.custom.model.result.CustomInfoResult; +import cn.stylefeng.guns.modular.zsx.bs.custom.service.CustomInfoService; +import cn.stylefeng.roses.core.util.ToolUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +import java.io.Serializable; +import java.util.List; + +/** + * <p> + * 瀹㈡埛淇℃伅 鏈嶅姟瀹炵幇绫� + * </p> + * + * @author ruimin + * @since 2023-09-18 + */ +@Service +public class CustomInfoServiceImpl extends ServiceImpl<CustomInfoMapper, CustomInfo> implements CustomInfoService { + + @Override + public void add(CustomInfoParam param){ + CustomInfo entity = getEntity(param); + this.save(entity); + } + + @Override + public void delete(CustomInfoParam param){ + this.removeById(getKey(param)); + } + + @Override + public void update(CustomInfoParam param){ + CustomInfo oldEntity = getOldEntity(param); + CustomInfo newEntity = getEntity(param); + ToolUtil.copyProperties(newEntity, oldEntity); + this.updateById(newEntity); + } + + @Override + public CustomInfoResult findBySpec(CustomInfoParam param){ + return null; + } + + @Override + public List<CustomInfoResult> findListBySpec(CustomInfoParam param){ + return null; + } + + @Override + public LayuiPageInfo findPageBySpec(CustomInfoParam param){ + Page pageContext = getPageContext(); + IPage page = this.baseMapper.customPageList(pageContext, param); + return LayuiPageFactory.createPageInfo(page); + } + + private Serializable getKey(CustomInfoParam param){ + return param.getId(); + } + + private Page getPageContext() { + return LayuiPageFactory.defaultPage(); + } + + private CustomInfo getOldEntity(CustomInfoParam param) { + return this.getById(getKey(param)); + } + + private CustomInfo getEntity(CustomInfoParam param) { + CustomInfo entity = new CustomInfo(); + ToolUtil.copyProperties(param, entity); + return entity; + } + +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/controller/EquipmentInfoController.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/controller/EquipmentInfoController.java new file mode 100644 index 0000000..a221948 --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/controller/EquipmentInfoController.java @@ -0,0 +1,136 @@ +package cn.stylefeng.guns.modular.zsx.bs.equipment.controller; + +import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; +import cn.stylefeng.guns.modular.zsx.bs.equipment.entity.EquipmentInfo; +import cn.stylefeng.guns.modular.zsx.bs.equipment.model.params.EquipmentInfoParam; +import cn.stylefeng.guns.modular.zsx.bs.equipment.service.EquipmentInfoService; +import cn.stylefeng.roses.core.base.controller.BaseController; +import cn.stylefeng.roses.kernel.model.response.ResponseData; +import cn.stylefeng.roses.core.mutidatasource.annotion.DataSource; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + + + +/** + * 璁惧妗f鎺у埗鍣� + * + * @author ruimin + * @Date 2023-09-18 15:50:49 + */ +@Controller +@RequestMapping("/equipmentInfo") +public class EquipmentInfoController extends BaseController { + + private String PREFIX = "/modular/bs/equipmentInfo"; + + @Autowired + private EquipmentInfoService equipmentInfoService; + + /** + * 璺宠浆鍒颁富椤甸潰 + * + * @author ruimin + * @Date 2023-09-18 + */ + @RequestMapping("") + public String index() { + return PREFIX + "/equipmentInfo.html"; + } + + /** + * 鏂板椤甸潰 + * + * @author ruimin + * @Date 2023-09-18 + */ + @RequestMapping("/add") + public String add() { + return PREFIX + "/equipmentInfo_add.html"; + } + + /** + * 缂栬緫椤甸潰 + * + * @author ruimin + * @Date 2023-09-18 + */ + @RequestMapping("/edit") + public String edit() { + return PREFIX + "/equipmentInfo_edit.html"; + } + + /** + * 鏂板鎺ュ彛 + * + * @author ruimin + * @Date 2023-09-18 + */ + @RequestMapping("/addItem") + @ResponseBody + @DataSource(name = "self") + public ResponseData addItem(EquipmentInfoParam equipmentInfoParam) { + this.equipmentInfoService.add(equipmentInfoParam); + return ResponseData.success(); + } + + /** + * 缂栬緫鎺ュ彛 + * + * @author ruimin + * @Date 2023-09-18 + */ + @RequestMapping("/editItem") + @ResponseBody + @DataSource(name = "self") + public ResponseData editItem(EquipmentInfoParam equipmentInfoParam) { + this.equipmentInfoService.update(equipmentInfoParam); + return ResponseData.success(); + } + + /** + * 鍒犻櫎鎺ュ彛 + * + * @author ruimin + * @Date 2023-09-18 + */ + @RequestMapping("/delete") + @ResponseBody + @DataSource(name = "self") + public ResponseData delete(EquipmentInfoParam equipmentInfoParam) { + this.equipmentInfoService.delete(equipmentInfoParam); + return ResponseData.success(); + } + + /** + * 鏌ョ湅璇︽儏鎺ュ彛 + * + * @author ruimin + * @Date 2023-09-18 + */ + @RequestMapping("/detail") + @ResponseBody + @DataSource(name = "self") + public ResponseData detail(EquipmentInfoParam equipmentInfoParam) { + EquipmentInfo detail = this.equipmentInfoService.getById(equipmentInfoParam.getId()); + return ResponseData.success(detail); + } + + /** + * 鏌ヨ鍒楄〃 + * + * @author ruimin + * @Date 2023-09-18 + */ + @ResponseBody + @RequestMapping("/list") + @DataSource(name = "self") + public LayuiPageInfo list(EquipmentInfoParam equipmentInfoParam) { + return this.equipmentInfoService.findPageBySpec(equipmentInfoParam); + } + +} + + diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/entity/EquipmentInfo.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/entity/EquipmentInfo.java new file mode 100644 index 0000000..e4369cf --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/entity/EquipmentInfo.java @@ -0,0 +1,300 @@ +package cn.stylefeng.guns.modular.zsx.bs.equipment.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import java.io.Serializable; + +/** + * <p> + * 璁惧妗f + * </p> + * + * @author ruimin + * @since 2023-09-18 + */ +@TableName("bs_equipment_info") +public class EquipmentInfo implements Serializable { + + private static final long serialVersionUID=1L; + + /** + * 涓婚敭id + */ + @TableId(value = "id", type = IdType.ID_WORKER) + private Long id; + + /** + * 璁惧缂栧彿 + */ + @TableField("equipment_no") + private String equipmentNo; + + /** + * 璁惧鍚嶇О + */ + @TableField("equipment_name") + private String equipmentName; + + /** + * 璁惧绫诲瀷 + */ + @TableField("equipment_type") + private String equipmentType; + + /** + * 瑙勬牸鍨嬪彿 + */ + @TableField("equipment_model") + private String equipmentModel; + + /** + * 杞﹂棿缂栧彿 + */ + @TableField("workshop_code") + private String workshopCode; + + /** + * 浜х嚎缂栧彿 + */ + @TableField("production_line_code") + private String productionLineCode; + + /** + * 宸ヤ綅缂栧彿 + */ + @TableField("location_code") + private String locationCode; + + /** + * 渚涘簲鍟嗙紪鍙� + */ + @TableField("supplier_code") + private String supplierCode; + + /** + * 棰勭暀瀛楁1 + */ + @TableField("spare_field_1") + private String spareField1; + + /** + * 棰勭暀瀛楁2 + */ + @TableField("spare_field_2") + private String spareField2; + + /** + * 棰勭暀瀛楁3 + */ + @TableField("spare_field_3") + private String spareField3; + + /** + * 棰勭暀瀛楁4 + */ + @TableField("spare_field_4") + private String spareField4; + + /** + * 澶囨敞 + */ + @TableField("remark") + private String remark; + + /** + * 鍒涘缓鐢ㄦ埛 + */ + @TableField(value = "create_user", fill = FieldFill.INSERT) + private String createUser; + + /** + * 鍒涘缓鏃堕棿 + */ + @TableField(value = "create_time", fill = FieldFill.INSERT) + private Date createTime; + + /** + * 鏇存敼鐢ㄦ埛 + */ + @TableField(value = "update_user", fill = FieldFill.UPDATE) + private String updateUser; + + /** + * 鏇存敼鏃堕棿 + */ + @TableField(value = "update_time", fill = FieldFill.UPDATE) + private Date updateTime; + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getEquipmentNo() { + return equipmentNo; + } + + public void setEquipmentNo(String equipmentNo) { + this.equipmentNo = equipmentNo; + } + + public String getEquipmentName() { + return equipmentName; + } + + public void setEquipmentName(String equipmentName) { + this.equipmentName = equipmentName; + } + + public String getEquipmentType() { + return equipmentType; + } + + public void setEquipmentType(String equipmentType) { + this.equipmentType = equipmentType; + } + + public String getEquipmentModel() { + return equipmentModel; + } + + public void setEquipmentModel(String equipmentModel) { + this.equipmentModel = equipmentModel; + } + + public String getWorkshopCode() { + return workshopCode; + } + + public void setWorkshopCode(String workshopCode) { + this.workshopCode = workshopCode; + } + + public String getProductionLineCode() { + return productionLineCode; + } + + public void setProductionLineCode(String productionLineCode) { + this.productionLineCode = productionLineCode; + } + + public String getLocationCode() { + return locationCode; + } + + public void setLocationCode(String locationCode) { + this.locationCode = locationCode; + } + + public String getSupplierCode() { + return supplierCode; + } + + public void setSupplierCode(String supplierCode) { + this.supplierCode = supplierCode; + } + + public String getSpareField1() { + return spareField1; + } + + public void setSpareField1(String spareField1) { + this.spareField1 = spareField1; + } + + public String getSpareField2() { + return spareField2; + } + + public void setSpareField2(String spareField2) { + this.spareField2 = spareField2; + } + + public String getSpareField3() { + return spareField3; + } + + public void setSpareField3(String spareField3) { + this.spareField3 = spareField3; + } + + public String getSpareField4() { + return spareField4; + } + + public void setSpareField4(String spareField4) { + this.spareField4 = spareField4; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateUser() { + return updateUser; + } + + public void setUpdateUser(String updateUser) { + this.updateUser = updateUser; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + @Override + public String toString() { + return "EquipmentInfo{" + + "id=" + id + + ", equipmentNo=" + equipmentNo + + ", equipmentName=" + equipmentName + + ", equipmentType=" + equipmentType + + ", equipmentModel=" + equipmentModel + + ", workshopCode=" + workshopCode + + ", productionLineCode=" + productionLineCode + + ", locationCode=" + locationCode + + ", supplierCode=" + supplierCode + + ", spareField1=" + spareField1 + + ", spareField2=" + spareField2 + + ", spareField3=" + spareField3 + + ", spareField4=" + spareField4 + + ", remark=" + remark + + ", createUser=" + createUser + + ", createTime=" + createTime + + ", updateUser=" + updateUser + + ", updateTime=" + updateTime + + "}"; + } +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/mapper/EquipmentInfoMapper.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/mapper/EquipmentInfoMapper.java new file mode 100644 index 0000000..64d5c95 --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/mapper/EquipmentInfoMapper.java @@ -0,0 +1,56 @@ +package cn.stylefeng.guns.modular.zsx.bs.equipment.mapper; + +import cn.stylefeng.guns.modular.zsx.bs.equipment.entity.EquipmentInfo; +import cn.stylefeng.guns.modular.zsx.bs.equipment.model.params.EquipmentInfoParam; +import cn.stylefeng.guns.modular.zsx.bs.equipment.model.result.EquipmentInfoResult; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * <p> + * 璁惧妗f Mapper 鎺ュ彛 + * </p> + * + * @author ruimin + * @since 2023-09-18 + */ +public interface EquipmentInfoMapper extends BaseMapper<EquipmentInfo> { + + /** + * 鑾峰彇鍒楄〃 + * + * @author ruimin + * @Date 2023-09-18 + */ + List<EquipmentInfoResult> customList(@Param("paramCondition") EquipmentInfoParam paramCondition); + + /** + * 鑾峰彇map鍒楄〃 + * + * @author ruimin + * @Date 2023-09-18 + */ + List<Map<String, Object>> customMapList(@Param("paramCondition") EquipmentInfoParam paramCondition); + + /** + * 鑾峰彇鍒嗛〉瀹炰綋鍒楄〃 + * + * @author ruimin + * @Date 2023-09-18 + */ + Page<EquipmentInfoResult> customPageList(@Param("page") Page page, @Param("paramCondition") EquipmentInfoParam paramCondition); + + /** + * 鑾峰彇鍒嗛〉map鍒楄〃 + * + * @author ruimin + * @Date 2023-09-18 + */ + Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") EquipmentInfoParam paramCondition); + +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/mapper/mapping/EquipmentInfoMapper.xml b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/mapper/mapping/EquipmentInfoMapper.xml new file mode 100644 index 0000000..4afb43c --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/mapper/mapping/EquipmentInfoMapper.xml @@ -0,0 +1,72 @@ +<?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"> +<mapper namespace="cn.stylefeng.guns.modular.zsx.bs.equipment.mapper.EquipmentInfoMapper"> + + <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> + <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.zsx.bs.equipment.entity.EquipmentInfo"> + <id column="id" property="id" /> + <result column="equipment_no" property="equipmentNo" /> + <result column="equipment_name" property="equipmentName" /> + <result column="equipment_type" property="equipmentType" /> + <result column="equipment_model" property="equipmentModel" /> + <result column="workshop_code" property="workshopCode" /> + <result column="production_line_code" property="productionLineCode" /> + <result column="location_code" property="locationCode" /> + <result column="supplier_code" property="supplierCode" /> + <result column="spare_field_1" property="spareField1" /> + <result column="spare_field_2" property="spareField2" /> + <result column="spare_field_3" property="spareField3" /> + <result column="spare_field_4" property="spareField4" /> + <result column="remark" property="remark" /> + <result column="create_user" property="createUser" /> + <result column="create_time" property="createTime" /> + <result column="update_user" property="updateUser" /> + <result column="update_time" property="updateTime" /> + </resultMap> + + <!-- 閫氱敤鏌ヨ缁撴灉鍒� --> + <sql id="Base_Column_List"> + id AS "id", equipment_no AS "equipmentNo", equipment_name AS "equipmentName", equipment_type AS "equipmentType", equipment_model AS "equipmentModel", workshop_code AS "workshopCode", production_line_code AS "productionLineCode", location_code AS "locationCode", supplier_code AS "supplierCode", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", spare_field_3 AS "spareField3", spare_field_4 AS "spareField4", remark AS "remark", create_user AS "createUser", create_time AS "createTime", update_user AS "updateUser", update_time AS "updateTime" + </sql> + + + <select id="customList" resultType="cn.stylefeng.guns.modular.zsx.bs.equipment.model.result.EquipmentInfoResult" parameterType="cn.stylefeng.guns.modular.zsx.bs.equipment.model.params.EquipmentInfoParam"> + select + <include refid="Base_Column_List"/> + from bs_equipment_info where 1 = 1 + <if test="paramCondition.equipmentNo != null and paramCondition.equipmentNo != ''"> + and equipment_no like CONCAT('%',#{paramCondition.equipmentNo},'%') + </if> + <if test="paramCondition.equipmentName != null and paramCondition.equipmentName != ''"> + and equipment_name like CONCAT('%',#{paramCondition.equipmentName},'%') + </if> + <if test="paramCondition.equipmentType != null and paramCondition.equipmentType != ''"> + and equipment_type like CONCAT('%',#{paramCondition.equipmentType},'%') + </if> + <if test="paramCondition.workshopCode != null and paramCondition.workshopCode != ''"> + and workshop_code like CONCAT('%',#{paramCondition.workshopCode},'%') + </if> + <if test="paramCondition.productionLineCode != null and paramCondition.productionLineCode != ''"> + and production_line_code like CONCAT('%',#{paramCondition.productionLineCode},'%') + </if> + </select> + + <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.bs.equipment.model.params.EquipmentInfoParam"> + select + <include refid="Base_Column_List"/> + from bs_equipment_info where 1 = 1 + </select> + + <select id="customPageList" resultType="cn.stylefeng.guns.modular.zsx.bs.equipment.model.result.EquipmentInfoResult" parameterType="cn.stylefeng.guns.modular.zsx.bs.equipment.model.params.EquipmentInfoParam"> + select + <include refid="Base_Column_List"/> + from bs_equipment_info where 1 = 1 + </select> + + <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.bs.equipment.model.params.EquipmentInfoParam"> + select + <include refid="Base_Column_List"/> + from bs_equipment_info where 1 = 1 + </select> + +</mapper> diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/model/params/EquipmentInfoParam.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/model/params/EquipmentInfoParam.java new file mode 100644 index 0000000..4a837cf --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/model/params/EquipmentInfoParam.java @@ -0,0 +1,118 @@ +package cn.stylefeng.guns.modular.zsx.bs.equipment.model.params; + +import lombok.Data; +import cn.stylefeng.roses.kernel.model.validator.BaseValidatingParam; +import java.util.Date; +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * <p> + * 璁惧妗f + * </p> + * + * @author ruimin + * @since 2023-09-18 + */ +@Data +public class EquipmentInfoParam implements Serializable, BaseValidatingParam { + + private static final long serialVersionUID = 1L; + + + /** + * 涓婚敭id + */ + private Long id; + + /** + * 璁惧缂栧彿 + */ + private String equipmentNo; + + /** + * 璁惧鍚嶇О + */ + private String equipmentName; + + /** + * 璁惧绫诲瀷 + */ + private String equipmentType; + + /** + * 瑙勬牸鍨嬪彿 + */ + private String equipmentModel; + + /** + * 杞﹂棿缂栧彿 + */ + private String workshopCode; + + /** + * 浜х嚎缂栧彿 + */ + private String productionLineCode; + + /** + * 宸ヤ綅缂栧彿 + */ + private String locationCode; + + /** + * 渚涘簲鍟嗙紪鍙� + */ + private String supplierCode; + + /** + * 棰勭暀瀛楁1 + */ + private String spareField1; + + /** + * 棰勭暀瀛楁2 + */ + private String spareField2; + + /** + * 棰勭暀瀛楁3 + */ + private String spareField3; + + /** + * 棰勭暀瀛楁4 + */ + private String spareField4; + + /** + * 澶囨敞 + */ + private String remark; + + /** + * 鍒涘缓鐢ㄦ埛 + */ + private String createUser; + + /** + * 鍒涘缓鏃堕棿 + */ + private Date createTime; + + /** + * 鏇存敼鐢ㄦ埛 + */ + private String updateUser; + + /** + * 鏇存敼鏃堕棿 + */ + private Date updateTime; + + @Override + public String checkParam() { + return null; + } + +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/model/result/EquipmentInfoResult.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/model/result/EquipmentInfoResult.java new file mode 100644 index 0000000..516a97b --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/model/result/EquipmentInfoResult.java @@ -0,0 +1,112 @@ +package cn.stylefeng.guns.modular.zsx.bs.equipment.model.result; + +import lombok.Data; +import java.util.Date; +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * <p> + * 璁惧妗f + * </p> + * + * @author ruimin + * @since 2023-09-18 + */ +@Data +public class EquipmentInfoResult implements Serializable { + + private static final long serialVersionUID = 1L; + + + /** + * 涓婚敭id + */ + private Long id; + + /** + * 璁惧缂栧彿 + */ + private String equipmentNo; + + /** + * 璁惧鍚嶇О + */ + private String equipmentName; + + /** + * 璁惧绫诲瀷 + */ + private String equipmentType; + + /** + * 瑙勬牸鍨嬪彿 + */ + private String equipmentModel; + + /** + * 杞﹂棿缂栧彿 + */ + private String workshopCode; + + /** + * 浜х嚎缂栧彿 + */ + private String productionLineCode; + + /** + * 宸ヤ綅缂栧彿 + */ + private String locationCode; + + /** + * 渚涘簲鍟嗙紪鍙� + */ + private String supplierCode; + + /** + * 棰勭暀瀛楁1 + */ + private String spareField1; + + /** + * 棰勭暀瀛楁2 + */ + private String spareField2; + + /** + * 棰勭暀瀛楁3 + */ + private String spareField3; + + /** + * 棰勭暀瀛楁4 + */ + private String spareField4; + + /** + * 澶囨敞 + */ + private String remark; + + /** + * 鍒涘缓鐢ㄦ埛 + */ + private String createUser; + + /** + * 鍒涘缓鏃堕棿 + */ + private Date createTime; + + /** + * 鏇存敼鐢ㄦ埛 + */ + private String updateUser; + + /** + * 鏇存敼鏃堕棿 + */ + private Date updateTime; + +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/service/EquipmentInfoService.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/service/EquipmentInfoService.java new file mode 100644 index 0000000..113dd1a --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/service/EquipmentInfoService.java @@ -0,0 +1,69 @@ +package cn.stylefeng.guns.modular.zsx.bs.equipment.service; + +import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; +import cn.stylefeng.guns.modular.zsx.bs.equipment.entity.EquipmentInfo; +import cn.stylefeng.guns.modular.zsx.bs.equipment.model.params.EquipmentInfoParam; +import cn.stylefeng.guns.modular.zsx.bs.equipment.model.result.EquipmentInfoResult; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + * <p> + * 璁惧妗f 鏈嶅姟绫� + * </p> + * + * @author ruimin + * @since 2023-09-18 + */ +public interface EquipmentInfoService extends IService<EquipmentInfo> { + + /** + * 鏂板 + * + * @author ruimin + * @Date 2023-09-18 + */ + void add(EquipmentInfoParam param); + + /** + * 鍒犻櫎 + * + * @author ruimin + * @Date 2023-09-18 + */ + void delete(EquipmentInfoParam param); + + /** + * 鏇存柊 + * + * @author ruimin + * @Date 2023-09-18 + */ + void update(EquipmentInfoParam param); + + /** + * 鏌ヨ鍗曟潯鏁版嵁锛孲pecification妯″紡 + * + * @author ruimin + * @Date 2023-09-18 + */ + EquipmentInfoResult findBySpec(EquipmentInfoParam param); + + /** + * 鏌ヨ鍒楄〃锛孲pecification妯″紡 + * + * @author ruimin + * @Date 2023-09-18 + */ + List<EquipmentInfoResult> findListBySpec(EquipmentInfoParam param); + + /** + * 鏌ヨ鍒嗛〉鏁版嵁锛孲pecification妯″紡 + * + * @author ruimin + * @Date 2023-09-18 + */ + LayuiPageInfo findPageBySpec(EquipmentInfoParam param); + +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/service/impl/EquipmentInfoServiceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/service/impl/EquipmentInfoServiceImpl.java new file mode 100644 index 0000000..20c054c --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/equipment/service/impl/EquipmentInfoServiceImpl.java @@ -0,0 +1,84 @@ +package cn.stylefeng.guns.modular.zsx.bs.equipment.service.impl; + +import cn.stylefeng.guns.base.pojo.page.LayuiPageFactory; +import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; +import cn.stylefeng.guns.modular.zsx.bs.equipment.entity.EquipmentInfo; +import cn.stylefeng.guns.modular.zsx.bs.equipment.mapper.EquipmentInfoMapper; +import cn.stylefeng.guns.modular.zsx.bs.equipment.model.params.EquipmentInfoParam; +import cn.stylefeng.guns.modular.zsx.bs.equipment.model.result.EquipmentInfoResult; +import cn.stylefeng.guns.modular.zsx.bs.equipment.service.EquipmentInfoService; +import cn.stylefeng.roses.core.util.ToolUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +import java.io.Serializable; +import java.util.List; + +/** + * <p> + * 璁惧妗f 鏈嶅姟瀹炵幇绫� + * </p> + * + * @author ruimin + * @since 2023-09-18 + */ +@Service +public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoMapper, EquipmentInfo> implements EquipmentInfoService { + + @Override + public void add(EquipmentInfoParam param){ + EquipmentInfo entity = getEntity(param); + this.save(entity); + } + + @Override + public void delete(EquipmentInfoParam param){ + this.removeById(getKey(param)); + } + + @Override + public void update(EquipmentInfoParam param){ + EquipmentInfo oldEntity = getOldEntity(param); + EquipmentInfo newEntity = getEntity(param); + ToolUtil.copyProperties(newEntity, oldEntity); + this.updateById(newEntity); + } + + @Override + public EquipmentInfoResult findBySpec(EquipmentInfoParam param){ + return null; + } + + @Override + public List<EquipmentInfoResult> findListBySpec(EquipmentInfoParam param){ + return null; + } + + @Override + public LayuiPageInfo findPageBySpec(EquipmentInfoParam param){ + Page pageContext = getPageContext(); + IPage page = this.baseMapper.customPageList(pageContext, param); + return LayuiPageFactory.createPageInfo(page); + } + + private Serializable getKey(EquipmentInfoParam param){ + return param.getId(); + } + + private Page getPageContext() { + return LayuiPageFactory.defaultPage(); + } + + private EquipmentInfo getOldEntity(EquipmentInfoParam param) { + return this.getById(getKey(param)); + } + + private EquipmentInfo getEntity(EquipmentInfoParam param) { + EquipmentInfo entity = new EquipmentInfo(); + ToolUtil.copyProperties(param, entity); + return entity; + } + +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/controller/LocationInfoController.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/controller/LocationInfoController.java new file mode 100644 index 0000000..b8e050e --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/controller/LocationInfoController.java @@ -0,0 +1,136 @@ +package cn.stylefeng.guns.modular.zsx.bs.location.controller; + +import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; +import cn.stylefeng.guns.modular.zsx.bs.location.entity.LocationInfo; +import cn.stylefeng.guns.modular.zsx.bs.location.model.params.LocationInfoParam; +import cn.stylefeng.guns.modular.zsx.bs.location.service.LocationInfoService; +import cn.stylefeng.roses.core.base.controller.BaseController; +import cn.stylefeng.roses.kernel.model.response.ResponseData; +import cn.stylefeng.roses.core.mutidatasource.annotion.DataSource; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + + + +/** + * 宸ヤ綅淇℃伅鎺у埗鍣� + * + * @author ruimin + * @Date 2023-09-19 11:01:29 + */ +@Controller +@RequestMapping("/locationInfo") +public class LocationInfoController extends BaseController { + + private String PREFIX = "/modular/bs/locationInfo"; + + @Autowired + private LocationInfoService locationInfoService; + + /** + * 璺宠浆鍒颁富椤甸潰 + * + * @author ruimin + * @Date 2023-09-19 + */ + @RequestMapping("") + public String index() { + return PREFIX + "/locationInfo.html"; + } + + /** + * 鏂板椤甸潰 + * + * @author ruimin + * @Date 2023-09-19 + */ + @RequestMapping("/add") + public String add() { + return PREFIX + "/locationInfo_add.html"; + } + + /** + * 缂栬緫椤甸潰 + * + * @author ruimin + * @Date 2023-09-19 + */ + @RequestMapping("/edit") + public String edit() { + return PREFIX + "/locationInfo_edit.html"; + } + + /** + * 鏂板鎺ュ彛 + * + * @author ruimin + * @Date 2023-09-19 + */ + @RequestMapping("/addItem") + @ResponseBody + @DataSource(name = "self") + public ResponseData addItem(LocationInfoParam locationInfoParam) { + this.locationInfoService.add(locationInfoParam); + return ResponseData.success(); + } + + /** + * 缂栬緫鎺ュ彛 + * + * @author ruimin + * @Date 2023-09-19 + */ + @RequestMapping("/editItem") + @ResponseBody + @DataSource(name = "self") + public ResponseData editItem(LocationInfoParam locationInfoParam) { + this.locationInfoService.update(locationInfoParam); + return ResponseData.success(); + } + + /** + * 鍒犻櫎鎺ュ彛 + * + * @author ruimin + * @Date 2023-09-19 + */ + @RequestMapping("/delete") + @ResponseBody + @DataSource(name = "self") + public ResponseData delete(LocationInfoParam locationInfoParam) { + this.locationInfoService.delete(locationInfoParam); + return ResponseData.success(); + } + + /** + * 鏌ョ湅璇︽儏鎺ュ彛 + * + * @author ruimin + * @Date 2023-09-19 + */ + @RequestMapping("/detail") + @ResponseBody + @DataSource(name = "self") + public ResponseData detail(LocationInfoParam locationInfoParam) { + LocationInfo detail = this.locationInfoService.getById(locationInfoParam.getId()); + return ResponseData.success(detail); + } + + /** + * 鏌ヨ鍒楄〃 + * + * @author ruimin + * @Date 2023-09-19 + */ + @ResponseBody + @RequestMapping("/list") + @DataSource(name = "self") + public LayuiPageInfo list(LocationInfoParam locationInfoParam) { + return this.locationInfoService.findPageBySpec(locationInfoParam); + } + +} + + diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/entity/LocationInfo.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/entity/LocationInfo.java new file mode 100644 index 0000000..4b4d80d --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/entity/LocationInfo.java @@ -0,0 +1,225 @@ +package cn.stylefeng.guns.modular.zsx.bs.location.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import java.io.Serializable; + +/** + * <p> + * 宸ヤ綅淇℃伅 + * </p> + * + * @author ruimin + * @since 2023-09-19 + */ +@TableName("bs_location_info") +public class LocationInfo implements Serializable { + + private static final long serialVersionUID=1L; + + /** + * 涓婚敭id + */ + @TableId(value = "id", type = IdType.ID_WORKER) + private Long id; + + /** + * 宸ヤ綅缂栧彿 + */ + @TableField("location_code") + private String locationCode; + + /** + * 宸ヤ綅鍚嶇О + */ + @TableField("location_name") + private String locationName; + + /** + * 宸ヤ綅绫诲瀷锛�1鑷姩2鍗婅嚜鍔�3鎵嬪姩锛� + */ + @TableField("location_type") + private String locationType; + + /** + * 杞﹂棿缂栧彿 + */ + @TableField("workshop_code") + private String workshopCode; + + /** + * 浜х嚎缂栧彿 + */ + @TableField("production_line_code") + private String productionLineCode; + + /** + * 棰勭暀瀛楁1 + */ + @TableField("spare_field_1") + private String spareField1; + + /** + * 棰勭暀瀛楁2 + */ + @TableField("spare_field_2") + private String spareField2; + + /** + * 澶囨敞 + */ + @TableField("remarks") + private String remarks; + + /** + * 鍒涘缓鐢ㄦ埛 + */ + @TableField(value = "create_user", fill = FieldFill.INSERT) + private String createUser; + + /** + * 鍒涘缓鏃堕棿 + */ + @TableField(value = "create_time", fill = FieldFill.INSERT) + private Date createTime; + + /** + * 鏇存敼鐢ㄦ埛 + */ + @TableField(value = "update_user", fill = FieldFill.UPDATE) + private String updateUser; + + /** + * 鏇存敼鏃堕棿 + */ + @TableField(value = "update_time", fill = FieldFill.UPDATE) + private Date updateTime; + + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getLocationCode() { + return locationCode; + } + + public void setLocationCode(String locationCode) { + this.locationCode = locationCode; + } + + public String getLocationName() { + return locationName; + } + + public void setLocationName(String locationName) { + this.locationName = locationName; + } + + public String getLocationType() { + return locationType; + } + + public void setLocationType(String locationType) { + this.locationType = locationType; + } + + public String getWorkshopCode() { + return workshopCode; + } + + public void setWorkshopCode(String workshopCode) { + this.workshopCode = workshopCode; + } + + public String getProductionLineCode() { + return productionLineCode; + } + + public void setProductionLineCode(String productionLineCode) { + this.productionLineCode = productionLineCode; + } + + public String getSpareField1() { + return spareField1; + } + + public void setSpareField1(String spareField1) { + this.spareField1 = spareField1; + } + + public String getSpareField2() { + return spareField2; + } + + public void setSpareField2(String spareField2) { + this.spareField2 = spareField2; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + public String getCreateUser() { + return createUser; + } + + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateUser() { + return updateUser; + } + + public void setUpdateUser(String updateUser) { + this.updateUser = updateUser; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + @Override + public String toString() { + return "LocationInfo{" + + "id=" + id + + ", locationCode=" + locationCode + + ", locationName=" + locationName + + ", locationType=" + locationType + + ", workshopCode=" + workshopCode + + ", productionLineCode=" + productionLineCode + + ", spareField1=" + spareField1 + + ", spareField2=" + spareField2 + + ", remarks=" + remarks + + ", createUser=" + createUser + + ", createTime=" + createTime + + ", updateUser=" + updateUser + + ", updateTime=" + updateTime + + "}"; + } +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/mapper/LocationInfoMapper.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/mapper/LocationInfoMapper.java new file mode 100644 index 0000000..195d074 --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/mapper/LocationInfoMapper.java @@ -0,0 +1,56 @@ +package cn.stylefeng.guns.modular.zsx.bs.location.mapper; + +import cn.stylefeng.guns.modular.zsx.bs.location.entity.LocationInfo; +import cn.stylefeng.guns.modular.zsx.bs.location.model.params.LocationInfoParam; +import cn.stylefeng.guns.modular.zsx.bs.location.model.result.LocationInfoResult; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * <p> + * 宸ヤ綅淇℃伅 Mapper 鎺ュ彛 + * </p> + * + * @author ruimin + * @since 2023-09-19 + */ +public interface LocationInfoMapper extends BaseMapper<LocationInfo> { + + /** + * 鑾峰彇鍒楄〃 + * + * @author ruimin + * @Date 2023-09-19 + */ + List<LocationInfoResult> customList(@Param("paramCondition") LocationInfoParam paramCondition); + + /** + * 鑾峰彇map鍒楄〃 + * + * @author ruimin + * @Date 2023-09-19 + */ + List<Map<String, Object>> customMapList(@Param("paramCondition") LocationInfoParam paramCondition); + + /** + * 鑾峰彇鍒嗛〉瀹炰綋鍒楄〃 + * + * @author ruimin + * @Date 2023-09-19 + */ + Page<LocationInfoResult> customPageList(@Param("page") Page page, @Param("paramCondition") LocationInfoParam paramCondition); + + /** + * 鑾峰彇鍒嗛〉map鍒楄〃 + * + * @author ruimin + * @Date 2023-09-19 + */ + Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") LocationInfoParam paramCondition); + +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/mapper/mapping/LocationInfoMapper.xml b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/mapper/mapping/LocationInfoMapper.xml new file mode 100644 index 0000000..a969003 --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/mapper/mapping/LocationInfoMapper.xml @@ -0,0 +1,112 @@ +<?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"> +<mapper namespace="cn.stylefeng.guns.modular.zsx.bs.location.mapper.LocationInfoMapper"> + + <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> + <resultMap id="BaseResultMap" type="cn.stylefeng.guns.modular.zsx.bs.location.entity.LocationInfo"> + <id column="id" property="id" /> + <result column="location_code" property="locationCode" /> + <result column="location_name" property="locationName" /> + <result column="location_type" property="locationType" /> + <result column="workshop_code" property="workshopCode" /> + <result column="production_line_code" property="productionLineCode" /> + <result column="spare_field_1" property="spareField1" /> + <result column="spare_field_2" property="spareField2" /> + <result column="remarks" property="remarks" /> + <result column="create_user" property="createUser" /> + <result column="create_time" property="createTime" /> + <result column="update_user" property="updateUser" /> + <result column="update_time" property="updateTime" /> + </resultMap> + + <!-- 閫氱敤鏌ヨ缁撴灉鍒� --> + <sql id="Base_Column_List"> + id AS "id", location_code AS "locationCode", location_name AS "locationName", location_type AS "locationType", workshop_code AS "workshopCode", production_line_code AS "productionLineCode", spare_field_1 AS "spareField1", spare_field_2 AS "spareField2", remarks AS "remarks", create_user AS "createUser", create_time AS "createTime", update_user AS "updateUser", update_time AS "updateTime" + </sql> + + + <select id="customList" resultType="cn.stylefeng.guns.modular.zsx.bs.location.model.result.LocationInfoResult" parameterType="cn.stylefeng.guns.modular.zsx.bs.location.model.params.LocationInfoParam"> + select + <include refid="Base_Column_List"/> + from bs_location_info where 1 = 1 + <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> + and location_code like CONCAT('%',#{paramCondition.locationCode},'%') + </if> + <if test="paramCondition.locationName != null and paramCondition.locationName != ''"> + and location_name like CONCAT('%',#{paramCondition.locationName},'%') + </if> + <if test="paramCondition.locationType != null and paramCondition.locationType != ''"> + and location_type like CONCAT('%',#{paramCondition.locationType},'%') + </if> + <if test="paramCondition.workshopCode != null and paramCondition.workshopCode != ''"> + and workshop_code like CONCAT('%',#{paramCondition.workshopCode},'%') + </if> + <if test="paramCondition.productionLineCode != null and paramCondition.productionLineCode != ''"> + and production_line_code like CONCAT('%',#{paramCondition.productionLineCode},'%') + </if> + </select> + + <select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.bs.location.model.params.LocationInfoParam"> + select + <include refid="Base_Column_List"/> + from bs_location_info where 1 = 1 + <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> + and location_code like CONCAT('%',#{paramCondition.locationCode},'%') + </if> + <if test="paramCondition.locationName != null and paramCondition.locationName != ''"> + and location_name like CONCAT('%',#{paramCondition.locationName},'%') + </if> + <if test="paramCondition.locationType != null and paramCondition.locationType != ''"> + and location_type like CONCAT('%',#{paramCondition.locationType},'%') + </if> + <if test="paramCondition.workshopCode != null and paramCondition.workshopCode != ''"> + and workshop_code like CONCAT('%',#{paramCondition.workshopCode},'%') + </if> + <if test="paramCondition.productionLineCode != null and paramCondition.productionLineCode != ''"> + and production_line_code like CONCAT('%',#{paramCondition.productionLineCode},'%') + </if> + </select> + + <select id="customPageList" resultType="cn.stylefeng.guns.modular.zsx.bs.location.model.result.LocationInfoResult" parameterType="cn.stylefeng.guns.modular.zsx.bs.location.model.params.LocationInfoParam"> + select + <include refid="Base_Column_List"/> + from bs_location_info where 1 = 1 + <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> + and location_code like CONCAT('%',#{paramCondition.locationCode},'%') + </if> + <if test="paramCondition.locationName != null and paramCondition.locationName != ''"> + and location_name like CONCAT('%',#{paramCondition.locationName},'%') + </if> + <if test="paramCondition.locationType != null and paramCondition.locationType != ''"> + and location_type like CONCAT('%',#{paramCondition.locationType},'%') + </if> + <if test="paramCondition.workshopCode != null and paramCondition.workshopCode != ''"> + and workshop_code like CONCAT('%',#{paramCondition.workshopCode},'%') + </if> + <if test="paramCondition.productionLineCode != null and paramCondition.productionLineCode != ''"> + and production_line_code like CONCAT('%',#{paramCondition.productionLineCode},'%') + </if> + </select> + + <select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.modular.zsx.bs.location.model.params.LocationInfoParam"> + select + <include refid="Base_Column_List"/> + from bs_location_info where 1 = 1 + <if test="paramCondition.locationCode != null and paramCondition.locationCode != ''"> + and location_code like CONCAT('%',#{paramCondition.locationCode},'%') + </if> + <if test="paramCondition.locationName != null and paramCondition.locationName != ''"> + and location_name like CONCAT('%',#{paramCondition.locationName},'%') + </if> + <if test="paramCondition.locationType != null and paramCondition.locationType != ''"> + and location_type like CONCAT('%',#{paramCondition.locationType},'%') + </if> + <if test="paramCondition.workshopCode != null and paramCondition.workshopCode != ''"> + and workshop_code like CONCAT('%',#{paramCondition.workshopCode},'%') + </if> + <if test="paramCondition.productionLineCode != null and paramCondition.productionLineCode != ''"> + and production_line_code like CONCAT('%',#{paramCondition.productionLineCode},'%') + </if> + </select> + +</mapper> diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/model/params/LocationInfoParam.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/model/params/LocationInfoParam.java new file mode 100644 index 0000000..eaf7646 --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/model/params/LocationInfoParam.java @@ -0,0 +1,93 @@ +package cn.stylefeng.guns.modular.zsx.bs.location.model.params; + +import lombok.Data; +import cn.stylefeng.roses.kernel.model.validator.BaseValidatingParam; +import java.util.Date; +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * <p> + * 宸ヤ綅淇℃伅 + * </p> + * + * @author ruimin + * @since 2023-09-19 + */ +@Data +public class LocationInfoParam implements Serializable, BaseValidatingParam { + + private static final long serialVersionUID = 1L; + + + /** + * 涓婚敭id + */ + private Long id; + + /** + * 宸ヤ綅缂栧彿 + */ + private String locationCode; + + /** + * 宸ヤ綅鍚嶇О + */ + private String locationName; + + /** + * 宸ヤ綅绫诲瀷锛�1鑷姩2鍗婅嚜鍔�3鎵嬪姩锛� + */ + private String locationType; + + /** + * 杞﹂棿缂栧彿 + */ + private String workshopCode; + + /** + * 浜х嚎缂栧彿 + */ + private String productionLineCode; + + /** + * 棰勭暀瀛楁1 + */ + private String spareField1; + + /** + * 棰勭暀瀛楁2 + */ + private String spareField2; + + /** + * 澶囨敞 + */ + private String remarks; + + /** + * 鍒涘缓鐢ㄦ埛 + */ + private String createUser; + + /** + * 鍒涘缓鏃堕棿 + */ + private Date createTime; + + /** + * 鏇存敼鐢ㄦ埛 + */ + private String updateUser; + + /** + * 鏇存敼鏃堕棿 + */ + private Date updateTime; + + @Override + public String checkParam() { + return null; + } + +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/model/result/LocationInfoResult.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/model/result/LocationInfoResult.java new file mode 100644 index 0000000..ff3b889 --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/model/result/LocationInfoResult.java @@ -0,0 +1,87 @@ +package cn.stylefeng.guns.modular.zsx.bs.location.model.result; + +import lombok.Data; +import java.util.Date; +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * <p> + * 宸ヤ綅淇℃伅 + * </p> + * + * @author ruimin + * @since 2023-09-19 + */ +@Data +public class LocationInfoResult implements Serializable { + + private static final long serialVersionUID = 1L; + + + /** + * 涓婚敭id + */ + private Long id; + + /** + * 宸ヤ綅缂栧彿 + */ + private String locationCode; + + /** + * 宸ヤ綅鍚嶇О + */ + private String locationName; + + /** + * 宸ヤ綅绫诲瀷锛�1鑷姩2鍗婅嚜鍔�3鎵嬪姩锛� + */ + private String locationType; + + /** + * 杞﹂棿缂栧彿 + */ + private String workshopCode; + + /** + * 浜х嚎缂栧彿 + */ + private String productionLineCode; + + /** + * 棰勭暀瀛楁1 + */ + private String spareField1; + + /** + * 棰勭暀瀛楁2 + */ + private String spareField2; + + /** + * 澶囨敞 + */ + private String remarks; + + /** + * 鍒涘缓鐢ㄦ埛 + */ + private String createUser; + + /** + * 鍒涘缓鏃堕棿 + */ + private Date createTime; + + /** + * 鏇存敼鐢ㄦ埛 + */ + private String updateUser; + + /** + * 鏇存敼鏃堕棿 + */ + private Date updateTime; + +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/service/LocationInfoService.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/service/LocationInfoService.java new file mode 100644 index 0000000..ec8458b --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/service/LocationInfoService.java @@ -0,0 +1,69 @@ +package cn.stylefeng.guns.modular.zsx.bs.location.service; + +import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; +import cn.stylefeng.guns.modular.zsx.bs.location.entity.LocationInfo; +import cn.stylefeng.guns.modular.zsx.bs.location.model.params.LocationInfoParam; +import cn.stylefeng.guns.modular.zsx.bs.location.model.result.LocationInfoResult; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + * <p> + * 宸ヤ綅淇℃伅 鏈嶅姟绫� + * </p> + * + * @author ruimin + * @since 2023-09-19 + */ +public interface LocationInfoService extends IService<LocationInfo> { + + /** + * 鏂板 + * + * @author ruimin + * @Date 2023-09-19 + */ + void add(LocationInfoParam param); + + /** + * 鍒犻櫎 + * + * @author ruimin + * @Date 2023-09-19 + */ + void delete(LocationInfoParam param); + + /** + * 鏇存柊 + * + * @author ruimin + * @Date 2023-09-19 + */ + void update(LocationInfoParam param); + + /** + * 鏌ヨ鍗曟潯鏁版嵁锛孲pecification妯″紡 + * + * @author ruimin + * @Date 2023-09-19 + */ + LocationInfoResult findBySpec(LocationInfoParam param); + + /** + * 鏌ヨ鍒楄〃锛孲pecification妯″紡 + * + * @author ruimin + * @Date 2023-09-19 + */ + List<LocationInfoResult> findListBySpec(LocationInfoParam param); + + /** + * 鏌ヨ鍒嗛〉鏁版嵁锛孲pecification妯″紡 + * + * @author ruimin + * @Date 2023-09-19 + */ + LayuiPageInfo findPageBySpec(LocationInfoParam param); + +} diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/service/impl/LocationInfoServiceImpl.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/service/impl/LocationInfoServiceImpl.java new file mode 100644 index 0000000..8aaf2b3 --- /dev/null +++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/modular/zsx/bs/location/service/impl/LocationInfoServiceImpl.java @@ -0,0 +1,84 @@ +package cn.stylefeng.guns.modular.zsx.bs.location.service.impl; + +import cn.stylefeng.guns.base.pojo.page.LayuiPageFactory; +import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo; +import cn.stylefeng.guns.modular.zsx.bs.location.entity.LocationInfo; +import cn.stylefeng.guns.modular.zsx.bs.location.mapper.LocationInfoMapper; +import cn.stylefeng.guns.modular.zsx.bs.location.model.params.LocationInfoParam; +import cn.stylefeng.guns.modular.zsx.bs.location.model.result.LocationInfoResult; +import cn.stylefeng.guns.modular.zsx.bs.location.service.LocationInfoService; +import cn.stylefeng.roses.core.util.ToolUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +import java.io.Serializable; +import java.util.List; + +/** + * <p> + * 宸ヤ綅淇℃伅 鏈嶅姟瀹炵幇绫� + * </p> + * + * @author ruimin + * @since 2023-09-19 + */ +@Service +public class LocationInfoServiceImpl extends ServiceImpl<LocationInfoMapper, LocationInfo> implements LocationInfoService { + + @Override + public void add(LocationInfoParam param){ + LocationInfo entity = getEntity(param); + this.save(entity); + } + + @Override + public void delete(LocationInfoParam param){ + this.removeById(getKey(param)); + } + + @Override + public void update(LocationInfoParam param){ + LocationInfo oldEntity = getOldEntity(param); + LocationInfo newEntity = getEntity(param); + ToolUtil.copyProperties(newEntity, oldEntity); + this.updateById(newEntity); + } + + @Override + public LocationInfoResult findBySpec(LocationInfoParam param){ + return null; + } + + @Override + public List<LocationInfoResult> findListBySpec(LocationInfoParam param){ + return null; + } + + @Override + public LayuiPageInfo findPageBySpec(LocationInfoParam param){ + Page pageContext = getPageContext(); + IPage page = this.baseMapper.customPageList(pageContext, param); + return LayuiPageFactory.createPageInfo(page); + } + + private Serializable getKey(LocationInfoParam param){ + return param.getId(); + } + + private Page getPageContext() { + return LayuiPageFactory.defaultPage(); + } + + private LocationInfo getOldEntity(LocationInfoParam param) { + return this.getById(getKey(param)); + } + + private LocationInfo getEntity(LocationInfoParam param) { + LocationInfo entity = new LocationInfo(); + ToolUtil.copyProperties(param, entity); + return entity; + } + +} diff --git a/guns-vip-main/src/main/sqls/customInfo_menus.sql b/guns-vip-main/src/main/sqls/customInfo_menus.sql new file mode 100644 index 0000000..d8964f1 --- /dev/null +++ b/guns-vip-main/src/main/sqls/customInfo_menus.sql @@ -0,0 +1,4 @@ +INSERT INTO `sys_menu`(`MENU_ID`, `CODE`, `PCODE`, `PCODES`, `NAME`, `ICON`, `URL`, `SORT`, `LEVELS`, `MENU_FLAG`, `DESCRIPTION`, `STATUS`, `NEW_PAGE_FLAG`, `OPEN_FLAG`, `SYSTEM_TYPE`, `CREATE_TIME`, `UPDATE_TIME`, `CREATE_USER`, `UPDATE_USER`) VALUES (1703674927420198913, 'CUSTOM_INFO', '0', '[0],', '瀹㈡埛淇℃伅', 'fa-star', '/customInfo', 999, 1, 'Y', '', 'ENABLE', '', '', 'BASE_SYSTEM', '2023-09-18 15:38:50', '2023-09-18 15:38:50', 1, 1); +INSERT INTO `sys_menu`(`MENU_ID`, `CODE`, `PCODE`, `PCODES`, `NAME`, `ICON`, `URL`, `SORT`, `LEVELS`, `MENU_FLAG`, `DESCRIPTION`, `STATUS`, `NEW_PAGE_FLAG`, `OPEN_FLAG`, `SYSTEM_TYPE`, `CREATE_TIME`, `UPDATE_TIME`, `CREATE_USER`, `UPDATE_USER`) VALUES (1703674927428587521, 'CUSTOM_INFO_ADD', 'CUSTOM_INFO', '[0],[CUSTOM_INFO],', '瀹㈡埛淇℃伅娣诲姞', 'fa-star', '', 999, 2, 'N', '', 'ENABLE', '', '', 'BASE_SYSTEM', '2023-09-18 15:38:50', '2023-09-18 15:38:50', 1, 1); +INSERT INTO `sys_menu`(`MENU_ID`, `CODE`, `PCODE`, `PCODES`, `NAME`, `ICON`, `URL`, `SORT`, `LEVELS`, `MENU_FLAG`, `DESCRIPTION`, `STATUS`, `NEW_PAGE_FLAG`, `OPEN_FLAG`, `SYSTEM_TYPE`, `CREATE_TIME`, `UPDATE_TIME`, `CREATE_USER`, `UPDATE_USER`) VALUES (1703674927428587522, 'CUSTOM_INFO_EDIT', 'CUSTOM_INFO', '[0],[CUSTOM_INFO],', '瀹㈡埛淇℃伅淇敼', 'fa-star', '', 999, 2, 'N', '', 'ENABLE', '', '', 'BASE_SYSTEM', '2023-09-18 15:38:50', '2023-09-18 15:38:50', 1, 1); +INSERT INTO `sys_menu`(`MENU_ID`, `CODE`, `PCODE`, `PCODES`, `NAME`, `ICON`, `URL`, `SORT`, `LEVELS`, `MENU_FLAG`, `DESCRIPTION`, `STATUS`, `NEW_PAGE_FLAG`, `OPEN_FLAG`, `SYSTEM_TYPE`, `CREATE_TIME`, `UPDATE_TIME`, `CREATE_USER`, `UPDATE_USER`) VALUES (1703674927428587523, 'CUSTOM_INFO_DELETE', 'CUSTOM_INFO', '[0],[CUSTOM_INFO],', '瀹㈡埛淇℃伅鍒犻櫎', 'fa-star', '', 999, 2, 'N', '', 'ENABLE', '', '', 'BASE_SYSTEM', '2023-09-18 15:38:50', '2023-09-18 15:38:50', 1, 1); diff --git a/guns-vip-main/src/main/sqls/equipmentInfo_menus.sql b/guns-vip-main/src/main/sqls/equipmentInfo_menus.sql new file mode 100644 index 0000000..414eacf --- /dev/null +++ b/guns-vip-main/src/main/sqls/equipmentInfo_menus.sql @@ -0,0 +1,4 @@ +INSERT INTO `sys_menu`(`MENU_ID`, `CODE`, `PCODE`, `PCODES`, `NAME`, `ICON`, `URL`, `SORT`, `LEVELS`, `MENU_FLAG`, `DESCRIPTION`, `STATUS`, `NEW_PAGE_FLAG`, `OPEN_FLAG`, `SYSTEM_TYPE`, `CREATE_TIME`, `UPDATE_TIME`, `CREATE_USER`, `UPDATE_USER`) VALUES (1703677943812665346, 'EQUIPMENT_INFO', '0', '[0],', '璁惧妗f', 'fa-star', '/equipmentInfo', 999, 1, 'Y', '', 'ENABLE', '', '', 'BASE_SYSTEM', '2023-09-18 15:50:49', '2023-09-18 15:50:49', 1, 1); +INSERT INTO `sys_menu`(`MENU_ID`, `CODE`, `PCODE`, `PCODES`, `NAME`, `ICON`, `URL`, `SORT`, `LEVELS`, `MENU_FLAG`, `DESCRIPTION`, `STATUS`, `NEW_PAGE_FLAG`, `OPEN_FLAG`, `SYSTEM_TYPE`, `CREATE_TIME`, `UPDATE_TIME`, `CREATE_USER`, `UPDATE_USER`) VALUES (1703677943812665347, 'EQUIPMENT_INFO_ADD', 'EQUIPMENT_INFO', '[0],[EQUIPMENT_INFO],', '璁惧妗f娣诲姞', 'fa-star', '', 999, 2, 'N', '', 'ENABLE', '', '', 'BASE_SYSTEM', '2023-09-18 15:50:49', '2023-09-18 15:50:49', 1, 1); +INSERT INTO `sys_menu`(`MENU_ID`, `CODE`, `PCODE`, `PCODES`, `NAME`, `ICON`, `URL`, `SORT`, `LEVELS`, `MENU_FLAG`, `DESCRIPTION`, `STATUS`, `NEW_PAGE_FLAG`, `OPEN_FLAG`, `SYSTEM_TYPE`, `CREATE_TIME`, `UPDATE_TIME`, `CREATE_USER`, `UPDATE_USER`) VALUES (1703677943812665348, 'EQUIPMENT_INFO_EDIT', 'EQUIPMENT_INFO', '[0],[EQUIPMENT_INFO],', '璁惧妗f淇敼', 'fa-star', '', 999, 2, 'N', '', 'ENABLE', '', '', 'BASE_SYSTEM', '2023-09-18 15:50:49', '2023-09-18 15:50:49', 1, 1); +INSERT INTO `sys_menu`(`MENU_ID`, `CODE`, `PCODE`, `PCODES`, `NAME`, `ICON`, `URL`, `SORT`, `LEVELS`, `MENU_FLAG`, `DESCRIPTION`, `STATUS`, `NEW_PAGE_FLAG`, `OPEN_FLAG`, `SYSTEM_TYPE`, `CREATE_TIME`, `UPDATE_TIME`, `CREATE_USER`, `UPDATE_USER`) VALUES (1703677943812665349, 'EQUIPMENT_INFO_DELETE', 'EQUIPMENT_INFO', '[0],[EQUIPMENT_INFO],', '璁惧妗f鍒犻櫎', 'fa-star', '', 999, 2, 'N', '', 'ENABLE', '', '', 'BASE_SYSTEM', '2023-09-18 15:50:49', '2023-09-18 15:50:49', 1, 1); diff --git a/guns-vip-main/src/main/sqls/locationInfo_menus.sql b/guns-vip-main/src/main/sqls/locationInfo_menus.sql new file mode 100644 index 0000000..24884e3 --- /dev/null +++ b/guns-vip-main/src/main/sqls/locationInfo_menus.sql @@ -0,0 +1,4 @@ +INSERT INTO `sys_menu`(`MENU_ID`, `CODE`, `PCODE`, `PCODES`, `NAME`, `ICON`, `URL`, `SORT`, `LEVELS`, `MENU_FLAG`, `DESCRIPTION`, `STATUS`, `NEW_PAGE_FLAG`, `OPEN_FLAG`, `SYSTEM_TYPE`, `CREATE_TIME`, `UPDATE_TIME`, `CREATE_USER`, `UPDATE_USER`) VALUES (1703967521480073218, 'LOCATION_INFO', '0', '[0],', '宸ヤ綅淇℃伅', 'fa-star', '/locationInfo', 999, 1, 'Y', '', 'ENABLE', '', '', 'BASE_SYSTEM', '2023-09-19 11:01:29', '2023-09-19 11:01:29', 1, 1); +INSERT INTO `sys_menu`(`MENU_ID`, `CODE`, `PCODE`, `PCODES`, `NAME`, `ICON`, `URL`, `SORT`, `LEVELS`, `MENU_FLAG`, `DESCRIPTION`, `STATUS`, `NEW_PAGE_FLAG`, `OPEN_FLAG`, `SYSTEM_TYPE`, `CREATE_TIME`, `UPDATE_TIME`, `CREATE_USER`, `UPDATE_USER`) VALUES (1703967521480073219, 'LOCATION_INFO_ADD', 'LOCATION_INFO', '[0],[LOCATION_INFO],', '宸ヤ綅淇℃伅娣诲姞', 'fa-star', '', 999, 2, 'N', '', 'ENABLE', '', '', 'BASE_SYSTEM', '2023-09-19 11:01:29', '2023-09-19 11:01:29', 1, 1); +INSERT INTO `sys_menu`(`MENU_ID`, `CODE`, `PCODE`, `PCODES`, `NAME`, `ICON`, `URL`, `SORT`, `LEVELS`, `MENU_FLAG`, `DESCRIPTION`, `STATUS`, `NEW_PAGE_FLAG`, `OPEN_FLAG`, `SYSTEM_TYPE`, `CREATE_TIME`, `UPDATE_TIME`, `CREATE_USER`, `UPDATE_USER`) VALUES (1703967521480073220, 'LOCATION_INFO_EDIT', 'LOCATION_INFO', '[0],[LOCATION_INFO],', '宸ヤ綅淇℃伅淇敼', 'fa-star', '', 999, 2, 'N', '', 'ENABLE', '', '', 'BASE_SYSTEM', '2023-09-19 11:01:29', '2023-09-19 11:01:29', 1, 1); +INSERT INTO `sys_menu`(`MENU_ID`, `CODE`, `PCODE`, `PCODES`, `NAME`, `ICON`, `URL`, `SORT`, `LEVELS`, `MENU_FLAG`, `DESCRIPTION`, `STATUS`, `NEW_PAGE_FLAG`, `OPEN_FLAG`, `SYSTEM_TYPE`, `CREATE_TIME`, `UPDATE_TIME`, `CREATE_USER`, `UPDATE_USER`) VALUES (1703967521488461825, 'LOCATION_INFO_DELETE', 'LOCATION_INFO', '[0],[LOCATION_INFO],', '宸ヤ綅淇℃伅鍒犻櫎', 'fa-star', '', 999, 2, 'N', '', 'ENABLE', '', '', 'BASE_SYSTEM', '2023-09-19 11:01:29', '2023-09-19 11:01:29', 1, 1); diff --git a/guns-vip-main/src/main/webapp/assets/modular/bs/customInfo/customInfo.js b/guns-vip-main/src/main/webapp/assets/modular/bs/customInfo/customInfo.js new file mode 100644 index 0000000..01fe2aa --- /dev/null +++ b/guns-vip-main/src/main/webapp/assets/modular/bs/customInfo/customInfo.js @@ -0,0 +1,136 @@ +layui.use(['table', 'admin', 'ax', 'func'], function () { + var $ = layui.$; + var table = layui.table; + var $ax = layui.ax; + var admin = layui.admin; + var func = layui.func; + + /** + * 瀹㈡埛淇℃伅绠$悊 + */ + var CustomInfo = { + tableId: "customInfoTable" + }; + + /** + * 鍒濆鍖栬〃鏍肩殑鍒� + */ + CustomInfo.initColumn = function () { + return [[ + {type: 'checkbox'}, + {field: 'id', hide: true, title: 'id'}, + {field: 'customerCode', sort: true, title: '瀹㈡埛缂栧彿'}, + {field: 'customerName', sort: true, title: '瀹㈡埛鍚嶇О'}, + {field: 'customerType', sort: true, title: '瀹㈡埛绫诲瀷'}, + {field: 'contact', sort: true, title: '鑱旂郴鏂瑰紡'}, + {field: 'remarks', sort: true, title: '澶囨敞'}, + {field: 'createTime', sort: true, title: '鍒涘缓鏃堕棿',width: 160}, + {field: 'createUser', sort: true, title: '鍒涘缓鐢ㄦ埛'}, + {field: 'updateTime', sort: true, title: '淇敼鏃堕棿',width: 160}, + {field: 'updateUser', sort: true, title: '淇敼鐢ㄦ埛'}, + {fixed: 'right',width: 125, minWidth: 125, align: 'center', toolbar: '#tableBar', title: '鎿嶄綔'} + ]]; + }; + + /** + * 鐐瑰嚮鏌ヨ鎸夐挳 + */ + CustomInfo.search = function () { + var queryData = {}; + + queryData['customerCode'] = $('#customerCode').val(); + queryData['customerName'] = $('#customerName').val(); + queryData['customerType'] = $('#customerType').val(); + + + table.reload(CustomInfo.tableId, { + where: queryData, page: {curr: 1} + }); + }; + + /** + * 璺宠浆鍒版坊鍔犻〉闈� + */ + CustomInfo.jumpAddPage = function () { + window.location.href = Feng.ctxPath + '/customInfo/add' + }; + + /** + * 璺宠浆鍒扮紪杈戦〉闈� + * + * @param data 鐐瑰嚮鎸夐挳鏃跺�欑殑琛屾暟鎹� + */ + CustomInfo.jumpEditPage = function (data) { + window.location.href = Feng.ctxPath + '/customInfo/edit?id=' + data.id + }; + + /** + * 瀵煎嚭excel鎸夐挳 + */ + CustomInfo.exportExcel = function () { + var checkRows = table.checkStatus(CustomInfo.tableId); + if (checkRows.data.length === 0) { + Feng.error("璇烽�夋嫨瑕佸鍑虹殑鏁版嵁"); + } else { + table.exportFile(tableResult.config.id, checkRows.data, 'xls'); + } + }; + + /** + * 鐐瑰嚮鍒犻櫎 + * + * @param data 鐐瑰嚮鎸夐挳鏃跺�欑殑琛屾暟鎹� + */ + CustomInfo.onDeleteItem = function (data) { + var operation = function () { + var ajax = new $ax(Feng.ctxPath + "/customInfo/delete", function (data) { + Feng.success("鍒犻櫎鎴愬姛!"); + table.reload(CustomInfo.tableId); + }, function (data) { + Feng.error("鍒犻櫎澶辫触!" + data.responseJSON.message + "!"); + }); + ajax.set("id", data.id); + ajax.start(); + }; + Feng.confirm("鏄惁鍒犻櫎?", operation); + }; + + // 娓叉煋琛ㄦ牸 + var tableResult = table.render({ + elem: '#' + CustomInfo.tableId, + url: Feng.ctxPath + '/customInfo/list', + page: true, + height: "full-158", + cellMinWidth: 100, + cols: CustomInfo.initColumn() + }); + + // 鎼滅储鎸夐挳鐐瑰嚮浜嬩欢 + $('#btnSearch').click(function () { + CustomInfo.search(); + }); + + // 娣诲姞鎸夐挳鐐瑰嚮浜嬩欢 + $('#btnAdd').click(function () { + + CustomInfo.jumpAddPage(); + + }); + + // 瀵煎嚭excel + $('#btnExp').click(function () { + CustomInfo.exportExcel(); + }); + + // 宸ュ叿鏉$偣鍑讳簨浠� + table.on('tool(' + CustomInfo.tableId + ')', function (obj) { + var data = obj.data; + var layEvent = obj.event; + + if (layEvent === 'edit') { + CustomInfo.jumpEditPage(data); + } else if (layEvent === 'delete') { + CustomInfo.onDeleteItem(data); + } + }); +}); diff --git a/guns-vip-main/src/main/webapp/assets/modular/bs/customInfo/customInfo_add.js b/guns-vip-main/src/main/webapp/assets/modular/bs/customInfo/customInfo_add.js new file mode 100644 index 0000000..b43965e --- /dev/null +++ b/guns-vip-main/src/main/webapp/assets/modular/bs/customInfo/customInfo_add.js @@ -0,0 +1,59 @@ +/** + * 娣诲姞鎴栬�呬慨鏀归〉闈� + */ +var CustomInfoInfoDlg = { + data: { + id: "", + customerCode: "", + customerName: "", + customerType: "", + contact: "", + remarks: "", + createTime: "", + createUser: "", + updateTime: "", + updateUser: "" + } +}; + +layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () { + var $ = layui.jquery; + var $ax = layui.ax; + var form = layui.form; + var admin = layui.admin; + + + + + + + + + + + + + + + + + + //琛ㄥ崟鎻愪氦浜嬩欢 + form.on('submit(btnSubmit)', function (data) { + var ajax = new $ax(Feng.ctxPath + "/customInfo/addItem", function (data) { + Feng.success("娣诲姞鎴愬姛锛�"); + window.location.href = Feng.ctxPath + '/customInfo' + }, function (data) { + Feng.error("娣诲姞澶辫触锛�" + data.responseJSON.message) + }); + ajax.set(data.field); + ajax.start(); + + return false; + }); + + $('#cancel').click(function(){ + window.location.href = Feng.ctxPath + '/customInfo' + }); + +}); \ No newline at end of file diff --git a/guns-vip-main/src/main/webapp/assets/modular/bs/customInfo/customInfo_edit.js b/guns-vip-main/src/main/webapp/assets/modular/bs/customInfo/customInfo_edit.js new file mode 100644 index 0000000..6c54cf8 --- /dev/null +++ b/guns-vip-main/src/main/webapp/assets/modular/bs/customInfo/customInfo_edit.js @@ -0,0 +1,63 @@ +/** + * 璇︽儏瀵硅瘽妗� + */ +var CustomInfoInfoDlg = { + data: { + id: "", + customerCode: "", + customerName: "", + customerType: "", + contact: "", + remarks: "", + createTime: "", + createUser: "", + updateTime: "", + updateUser: "" + } +}; + +layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () { + var $ = layui.jquery; + var $ax = layui.ax; + var form = layui.form; + var admin = layui.admin; + + + + + + + + + + + + + + + + + + //鑾峰彇璇︽儏淇℃伅锛屽~鍏呰〃鍗� + var ajax = new $ax(Feng.ctxPath + "/customInfo/detail?id=" + Feng.getUrlParam("id")); + var result = ajax.start(); + form.val('customInfoForm', result.data); + + //琛ㄥ崟鎻愪氦浜嬩欢 + form.on('submit(btnSubmit)', function (data) { + var ajax = new $ax(Feng.ctxPath + "/customInfo/editItem", function (data) { + Feng.success("鏇存柊鎴愬姛锛�"); + window.location.href = Feng.ctxPath + '/customInfo' + }, function (data) { + Feng.error("鏇存柊澶辫触锛�" + data.responseJSON.message) + }); + ajax.set(data.field); + ajax.start(); + + return false; + }); + + $('#cancel').click(function(){ + window.location.href = Feng.ctxPath + '/customInfo' + }); +}); \ No newline at end of file diff --git a/guns-vip-main/src/main/webapp/assets/modular/bs/equipmentInfo/equipmentInfo.js b/guns-vip-main/src/main/webapp/assets/modular/bs/equipmentInfo/equipmentInfo.js new file mode 100644 index 0000000..3e32584 --- /dev/null +++ b/guns-vip-main/src/main/webapp/assets/modular/bs/equipmentInfo/equipmentInfo.js @@ -0,0 +1,141 @@ +layui.use(['table', 'admin', 'ax', 'func'], function () { + var $ = layui.$; + var table = layui.table; + var $ax = layui.ax; + var admin = layui.admin; + var func = layui.func; + + /** + * 璁惧妗f绠$悊 + */ + var EquipmentInfo = { + tableId: "equipmentInfoTable" + }; + + /** + * 鍒濆鍖栬〃鏍肩殑鍒� + */ + EquipmentInfo.initColumn = function () { + return [[ + {type: 'checkbox'}, + {field: 'id', hide: true, title: '涓婚敭id'}, + {field: 'equipmentNo', sort: true, title: '璁惧缂栧彿',width: 120}, + {field: 'equipmentName', sort: true, title: '璁惧鍚嶇О',width: 220}, + {field: 'equipmentType', sort: true, title: '璁惧绫诲瀷',width: 120}, + {field: 'equipmentModel', sort: true, title: '瑙勬牸鍨嬪彿',width: 120}, + {field: 'workshopCode', sort: true, title: '杞﹂棿缂栧彿',width: 120}, + {field: 'productionLineCode', sort: true, title: '浜х嚎缂栧彿',width: 120}, + {field: 'locationCode', sort: true, title: '宸ヤ綅缂栧彿',width: 120}, + {field: 'supplierCode', sort: true, title: '渚涘簲鍟嗙紪鍙�',width: 120}, + {field: 'remark', sort: true, title: '澶囨敞'}, + {field: 'createUser', sort: true, title: '鍒涘缓鐢ㄦ埛',width: 120}, + {field: 'createTime', sort: true, title: '鍒涘缓鏃堕棿',width: 160}, + {field: 'updateUser', sort: true, title: '鏇存敼鐢ㄦ埛',width: 120}, + {field: 'updateTime', sort: true, title: '鏇存敼鏃堕棿',width: 160}, + {fixed: 'right',width: 125, minWidth: 125, align: 'center', toolbar: '#tableBar', title: '鎿嶄綔'} + ]]; + }; + + /** + * 鐐瑰嚮鏌ヨ鎸夐挳 + */ + EquipmentInfo.search = function () { + var queryData = {}; + + queryData['equipmentNo'] = $('#equipmentNo').val(); + queryData['equipmentName'] = $('#equipmentName').val(); + queryData['equipmentType'] = $('#equipmentType').val(); + queryData['workshopCode'] = $('#workshopCode').val(); + queryData['productionLineCode'] = $('#productionLineCode').val(); + + table.reload(EquipmentInfo.tableId, { + where: queryData, page: {curr: 1} + }); + }; + + /** + * 璺宠浆鍒版坊鍔犻〉闈� + */ + EquipmentInfo.jumpAddPage = function () { + window.location.href = Feng.ctxPath + '/equipmentInfo/add' + }; + + /** + * 璺宠浆鍒扮紪杈戦〉闈� + * + * @param data 鐐瑰嚮鎸夐挳鏃跺�欑殑琛屾暟鎹� + */ + EquipmentInfo.jumpEditPage = function (data) { + window.location.href = Feng.ctxPath + '/equipmentInfo/edit?id=' + data.id + }; + + /** + * 瀵煎嚭excel鎸夐挳 + */ + EquipmentInfo.exportExcel = function () { + var checkRows = table.checkStatus(EquipmentInfo.tableId); + if (checkRows.data.length === 0) { + Feng.error("璇烽�夋嫨瑕佸鍑虹殑鏁版嵁"); + } else { + table.exportFile(tableResult.config.id, checkRows.data, 'xls'); + } + }; + + /** + * 鐐瑰嚮鍒犻櫎 + * + * @param data 鐐瑰嚮鎸夐挳鏃跺�欑殑琛屾暟鎹� + */ + EquipmentInfo.onDeleteItem = function (data) { + var operation = function () { + var ajax = new $ax(Feng.ctxPath + "/equipmentInfo/delete", function (data) { + Feng.success("鍒犻櫎鎴愬姛!"); + table.reload(EquipmentInfo.tableId); + }, function (data) { + Feng.error("鍒犻櫎澶辫触!" + data.responseJSON.message + "!"); + }); + ajax.set("id", data.id); + ajax.start(); + }; + Feng.confirm("鏄惁鍒犻櫎?", operation); + }; + + // 娓叉煋琛ㄦ牸 + var tableResult = table.render({ + elem: '#' + EquipmentInfo.tableId, + url: Feng.ctxPath + '/equipmentInfo/list', + page: true, + height: "full-158", + cellMinWidth: 100, + cols: EquipmentInfo.initColumn() + }); + + // 鎼滅储鎸夐挳鐐瑰嚮浜嬩欢 + $('#btnSearch').click(function () { + EquipmentInfo.search(); + }); + + // 娣诲姞鎸夐挳鐐瑰嚮浜嬩欢 + $('#btnAdd').click(function () { + + EquipmentInfo.jumpAddPage(); + + }); + + // 瀵煎嚭excel + $('#btnExp').click(function () { + EquipmentInfo.exportExcel(); + }); + + // 宸ュ叿鏉$偣鍑讳簨浠� + table.on('tool(' + EquipmentInfo.tableId + ')', function (obj) { + var data = obj.data; + var layEvent = obj.event; + + if (layEvent === 'edit') { + EquipmentInfo.jumpEditPage(data); + } else if (layEvent === 'delete') { + EquipmentInfo.onDeleteItem(data); + } + }); +}); diff --git a/guns-vip-main/src/main/webapp/assets/modular/bs/equipmentInfo/equipmentInfo_add.js b/guns-vip-main/src/main/webapp/assets/modular/bs/equipmentInfo/equipmentInfo_add.js new file mode 100644 index 0000000..e0fe08e --- /dev/null +++ b/guns-vip-main/src/main/webapp/assets/modular/bs/equipmentInfo/equipmentInfo_add.js @@ -0,0 +1,103 @@ +/** + * 娣诲姞鎴栬�呬慨鏀归〉闈� + */ +var EquipmentInfoInfoDlg = { + data: { + id: "", + equipmentNo: "", + equipmentName: "", + equipmentType: "", + equipmentModel: "", + workshopCode: "", + productionLineCode: "", + locationCode: "", + supplierCode: "", + spareField1: "", + spareField2: "", + spareField3: "", + spareField4: "", + remark: "", + createUser: "", + createTime: "", + updateUser: "", + updateTime: "" + } +}; + +layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () { + var $ = layui.jquery; + var $ax = layui.ax; + var form = layui.form; + var admin = layui.admin; + + + $(document).ready(function () { + $.ajax({ + type: "POST", + contentType: "application/json;charset=UTF-8", + url: Feng.ctxPath + '/workshopInfo/list', + success: function (result) { + $.each(result.data, function (index, value) { + $('#workshopCode').append(new Option(value.workshopCode));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + }); + layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶 + }, + }); + }); + + form.on("select", function (data) { + switch(data.elem.id){ + case 'workshopCode': + $.ajax({ + type: "POST", + contentType: "application/json;charset=UTF-8", + url: Feng.ctxPath + '/lineInfo/list?workshopCode='+data.value, + success: function (result) { + $('#productionLineCode').empty(); + $('#productionLineCode').append(new Option("璇烽�夋嫨浜х嚎", ""));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + + $.each(result.data, function (index, value) { + $('#productionLineCode').append(new Option(value.lineCode));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + }); + layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶 + }, + }); + break; + case 'productionLineCode': + $.ajax({ + type: "POST", + contentType: "application/json;charset=UTF-8", + url: Feng.ctxPath + '/locationInfo/list?productionLineCode='+data.value, + success: function (result) { + $('#locationCode').empty(); + $('#locationCode').append(new Option("璇烽�夋嫨宸ヤ綅", ""));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + + $.each(result.data, function (index, value) { + $('#locationCode').append(new Option(value.locationCode));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + }); + layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶 + }, + }); + break; + } + }); + + //琛ㄥ崟鎻愪氦浜嬩欢 + form.on('submit(btnSubmit)', function (data) { + var ajax = new $ax(Feng.ctxPath + "/equipmentInfo/addItem", function (data) { + Feng.success("娣诲姞鎴愬姛锛�"); + window.location.href = Feng.ctxPath + '/equipmentInfo' + }, function (data) { + Feng.error("娣诲姞澶辫触锛�" + data.responseJSON.message) + }); + ajax.set(data.field); + ajax.start(); + + return false; + }); + + $('#cancel').click(function(){ + window.location.href = Feng.ctxPath + '/equipmentInfo' + }); + +}); \ No newline at end of file diff --git a/guns-vip-main/src/main/webapp/assets/modular/bs/equipmentInfo/equipmentInfo_edit.js b/guns-vip-main/src/main/webapp/assets/modular/bs/equipmentInfo/equipmentInfo_edit.js new file mode 100644 index 0000000..51167ff --- /dev/null +++ b/guns-vip-main/src/main/webapp/assets/modular/bs/equipmentInfo/equipmentInfo_edit.js @@ -0,0 +1,130 @@ +/** + * 璇︽儏瀵硅瘽妗� + */ +var EquipmentInfoInfoDlg = { + data: { + id: "", + equipmentNo: "", + equipmentName: "", + equipmentType: "", + equipmentModel: "", + workshopCode: "", + productionLineCode: "", + locationCode: "", + supplierCode: "", + spareField1: "", + spareField2: "", + spareField3: "", + spareField4: "", + remark: "", + createUser: "", + createTime: "", + updateUser: "", + updateTime: "" + } +}; + +layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () { + var $ = layui.jquery; + var $ax = layui.ax; + var form = layui.form; + var admin = layui.admin; + + //鑾峰彇璇︽儏淇℃伅锛屽~鍏呰〃鍗� + var ajax = new $ax(Feng.ctxPath + "/equipmentInfo/detail?id=" + Feng.getUrlParam("id")); + var result = ajax.start(); + form.val('equipmentInfoForm', result.data); + + $(document).ready(function () { + $.ajax({ + type: "POST", + contentType: "application/json;charset=UTF-8", + url: Feng.ctxPath + '/workshopInfo/list', + success: function (result) { + $.each(result.data, function (index, value) { + $('#workshopCode').append(new Option(value.workshopCode));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + }); + $('#workshopCode').val(resultForm.data.workshopCode); + layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶 + }, + }); + $.ajax({ + type: "POST", + contentType: "application/json;charset=UTF-8", + url: Feng.ctxPath + '/lineInfo/list?workshopCode='+resultForm.data.workshopCode, + success: function (result) { + console.log(result); + $('#productionLineCode').empty(); + $.each(result.data, function (index, value) { + $('#productionLineCode').append(new Option(value.lineCode));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + }); + $('#productionLineCode').val(resultForm.data.productionLineCode); + layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶 + }, + }); + $.ajax({ + type: "POST", + contentType: "application/json;charset=UTF-8", + url: Feng.ctxPath + '/locationInfo/list?productionLineCode='+resultForm.data.productionLineCode, + success: function (result) { + $('#locationCode').empty(); + $.each(result.data, function (index, value) { + $('#locationCode').append(new Option(value.locationCode));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + }); + $('#locationCode').val(resultForm.data.locationCode); + layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶 + }, + }); + }); + + form.on("select", function (data) { + switch(data.elem.id){ + case 'workshopCode': + $.ajax({ + type: "POST", + contentType: "application/json;charset=UTF-8", + url: Feng.ctxPath + '/lineInfo/list?workshopCode='+data.value, + success: function (result) { + $('#productionLineCode').empty(); + $.each(result.data, function (index, value) { + $('#productionLineCode').append(new Option(value.lineCode));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + }); + layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶 + }, + }); + break; + case 'productionLineCode': + $.ajax({ + type: "POST", + contentType: "application/json;charset=UTF-8", + url: Feng.ctxPath + '/locationInfo/list?productionLineCode='+data.value, + success: function (result) { + $('#locationCode').empty(); + $.each(result.data, function (index, value) { + $('#locationCode').append(new Option(value.locationCode));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + }); + layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶 + }, + }); + break; + } + }); + + //琛ㄥ崟鎻愪氦浜嬩欢 + form.on('submit(btnSubmit)', function (data) { + var ajax = new $ax(Feng.ctxPath + "/equipmentInfo/editItem", function (data) { + Feng.success("鏇存柊鎴愬姛锛�"); + window.location.href = Feng.ctxPath + '/equipmentInfo' + }, function (data) { + Feng.error("鏇存柊澶辫触锛�" + data.responseJSON.message) + }); + ajax.set(data.field); + ajax.start(); + + return false; + }); + + $('#cancel').click(function(){ + window.location.href = Feng.ctxPath + '/equipmentInfo' + }); +}); \ No newline at end of file diff --git a/guns-vip-main/src/main/webapp/assets/modular/bs/locationInfo/locationInfo.js b/guns-vip-main/src/main/webapp/assets/modular/bs/locationInfo/locationInfo.js new file mode 100644 index 0000000..fe231a4 --- /dev/null +++ b/guns-vip-main/src/main/webapp/assets/modular/bs/locationInfo/locationInfo.js @@ -0,0 +1,156 @@ +layui.use(['table', 'admin', 'ax', 'func'], function () { + var $ = layui.$; + var table = layui.table; + var $ax = layui.ax; + var admin = layui.admin; + var func = layui.func; + + /** + * 宸ヤ綅淇℃伅绠$悊 + */ + var LocationInfo = { + tableId: "locationInfoTable" + }; + + getDictType(); + + /** + * 鍒濆鍖栬〃鏍肩殑鍒� + */ + LocationInfo.initColumn = function () { + return [[ + {type: 'checkbox'}, + {field: 'id', hide: true, title: '涓婚敭id'}, + {field: 'locationCode', sort: true, title: '宸ヤ綅缂栧彿'}, + {field: 'locationName', sort: true, title: '宸ヤ綅鍚嶇О'}, + {field: 'locationType', sort: true, title: '宸ヤ綅绫诲瀷锛�1鑷姩2鍗婅嚜鍔�3鎵嬪姩锛�'}, + {field: 'workshopCode', sort: true, title: '杞﹂棿缂栧彿'}, + {field: 'productionLineCode', sort: true, title: '浜х嚎缂栧彿'}, + {field: 'spareField1', sort: true, title: '棰勭暀瀛楁1'}, + {field: 'spareField2', sort: true, title: '棰勭暀瀛楁2'}, + {field: 'remarks', sort: true, title: '澶囨敞'}, + {field: 'createUser', sort: true, title: '鍒涘缓鐢ㄦ埛'}, + {field: 'createTime', sort: true, title: '鍒涘缓鏃堕棿'}, + {field: 'updateUser', sort: true, title: '鏇存敼鐢ㄦ埛'}, + {field: 'updateTime', sort: true, title: '鏇存敼鏃堕棿'}, + {fixed: 'right',width: 125, minWidth: 125, align: 'center', toolbar: '#tableBar', title: '鎿嶄綔'} + ]]; + }; + + /** + * 鐐瑰嚮鏌ヨ鎸夐挳 + */ + LocationInfo.search = function () { + var queryData = {}; + + queryData['locationCode'] = $('#locationCode').val(); + queryData['locationName'] = $('#locationName').val(); + queryData['locationType'] = $('#locationType').val(); + queryData['workshopCode'] = $('#workshopCode').val(); + queryData['productionLineCode'] = $('#productionLineCode').val(); + + table.reload(LocationInfo.tableId, { + where: queryData, page: {curr: 1} + }); + }; + + function getDictType(){ + $.ajax({ + type: "POST", + contentType: "application/json;charset=UTF-8", + url: Feng.ctxPath + '/dict/list?dictTypeId=1703969868646158337', + success: function (result) { + $.each(result.data, function (index, value) { + $('#locationType').append(new Option(value.name,value.code));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + }); + layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶 + }, + }); + } + + /** + * 璺宠浆鍒版坊鍔犻〉闈� + */ + LocationInfo.jumpAddPage = function () { + window.location.href = Feng.ctxPath + '/locationInfo/add' + }; + + /** + * 璺宠浆鍒扮紪杈戦〉闈� + * + * @param data 鐐瑰嚮鎸夐挳鏃跺�欑殑琛屾暟鎹� + */ + LocationInfo.jumpEditPage = function (data) { + window.location.href = Feng.ctxPath + '/locationInfo/edit?id=' + data.id + }; + + /** + * 瀵煎嚭excel鎸夐挳 + */ + LocationInfo.exportExcel = function () { + var checkRows = table.checkStatus(LocationInfo.tableId); + if (checkRows.data.length === 0) { + Feng.error("璇烽�夋嫨瑕佸鍑虹殑鏁版嵁"); + } else { + table.exportFile(tableResult.config.id, checkRows.data, 'xls'); + } + }; + + /** + * 鐐瑰嚮鍒犻櫎 + * + * @param data 鐐瑰嚮鎸夐挳鏃跺�欑殑琛屾暟鎹� + */ + LocationInfo.onDeleteItem = function (data) { + var operation = function () { + var ajax = new $ax(Feng.ctxPath + "/locationInfo/delete", function (data) { + Feng.success("鍒犻櫎鎴愬姛!"); + table.reload(LocationInfo.tableId); + }, function (data) { + Feng.error("鍒犻櫎澶辫触!" + data.responseJSON.message + "!"); + }); + ajax.set("id", data.id); + ajax.start(); + }; + Feng.confirm("鏄惁鍒犻櫎?", operation); + }; + + // 娓叉煋琛ㄦ牸 + var tableResult = table.render({ + elem: '#' + LocationInfo.tableId, + url: Feng.ctxPath + '/locationInfo/list', + page: true, + height: "full-158", + cellMinWidth: 100, + cols: LocationInfo.initColumn() + }); + + // 鎼滅储鎸夐挳鐐瑰嚮浜嬩欢 + $('#btnSearch').click(function () { + LocationInfo.search(); + }); + + // 娣诲姞鎸夐挳鐐瑰嚮浜嬩欢 + $('#btnAdd').click(function () { + + LocationInfo.jumpAddPage(); + + }); + + // 瀵煎嚭excel + $('#btnExp').click(function () { + LocationInfo.exportExcel(); + }); + + // 宸ュ叿鏉$偣鍑讳簨浠� + table.on('tool(' + LocationInfo.tableId + ')', function (obj) { + var data = obj.data; + var layEvent = obj.event; + + if (layEvent === 'edit') { + LocationInfo.jumpEditPage(data); + } else if (layEvent === 'delete') { + LocationInfo.onDeleteItem(data); + } + }); +}); diff --git a/guns-vip-main/src/main/webapp/assets/modular/bs/locationInfo/locationInfo_add.js b/guns-vip-main/src/main/webapp/assets/modular/bs/locationInfo/locationInfo_add.js new file mode 100644 index 0000000..c4bc9f3 --- /dev/null +++ b/guns-vip-main/src/main/webapp/assets/modular/bs/locationInfo/locationInfo_add.js @@ -0,0 +1,94 @@ +/** + * 娣诲姞鎴栬�呬慨鏀归〉闈� + */ +var LocationInfoInfoDlg = { + data: { + id: "", + locationCode: "", + locationName: "", + locationType: "", + workshopCode: "", + productionLineCode: "", + spareField1: "", + spareField2: "", + remarks: "", + createUser: "", + createTime: "", + updateUser: "", + updateTime: "" + } +}; + +layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () { + var $ = layui.jquery; + var $ax = layui.ax; + var form = layui.form; + var admin = layui.admin; + + $(document).ready(function () { + getDictType(); + $.ajax({ + type: "POST", + contentType: "application/json;charset=UTF-8", + url: Feng.ctxPath + '/workshopInfo/list', + success: function (result) { + $.each(result.data, function (index, value) { + $('#workshopCode').append(new Option(value.workshopCode));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + }); + layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶 + }, + }); + }); + + form.on("select", function (data) { + if (data.elem.id === "workshopCode") { + $.ajax({ + type: "POST", + contentType: "application/json;charset=UTF-8", + url: Feng.ctxPath + '/lineInfo/list?workshopCode='+ $('#workshopCode').val(), + success: function (result) { + $('#productionLineCode').empty(); + $('#productionLineCode').append(new Option("璇烽�夋嫨浜х嚎", ""));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + + $.each(result.data, function (index, value) { + $('#productionLineCode').append(new Option(value.lineCode, value.lineCode));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + }); + layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶 + }, + }); + } + }); + + function getDictType(){ + $.ajax({ + type: "POST", + contentType: "application/json;charset=UTF-8", + url: Feng.ctxPath + '/dict/list?dictTypeId=1703969868646158337', + success: function (result) { + $.each(result.data, function (index, value) { + $('#locationType').append(new Option(value.name,value.code));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + }); + layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶 + }, + }); + } + + //琛ㄥ崟鎻愪氦浜嬩欢 + form.on('submit(btnSubmit)', function (data) { + var ajax = new $ax(Feng.ctxPath + "/locationInfo/addItem", function (data) { + Feng.success("娣诲姞鎴愬姛锛�"); + window.location.href = Feng.ctxPath + '/locationInfo' + }, function (data) { + Feng.error("娣诲姞澶辫触锛�" + data.responseJSON.message) + }); + ajax.set(data.field); + ajax.start(); + + return false; + }); + + $('#cancel').click(function(){ + window.location.href = Feng.ctxPath + '/locationInfo' + }); + +}); \ No newline at end of file diff --git a/guns-vip-main/src/main/webapp/assets/modular/bs/locationInfo/locationInfo_edit.js b/guns-vip-main/src/main/webapp/assets/modular/bs/locationInfo/locationInfo_edit.js new file mode 100644 index 0000000..2539e23 --- /dev/null +++ b/guns-vip-main/src/main/webapp/assets/modular/bs/locationInfo/locationInfo_edit.js @@ -0,0 +1,111 @@ +/** + * 璇︽儏瀵硅瘽妗� + */ +var LocationInfoInfoDlg = { + data: { + id: "", + locationCode: "", + locationName: "", + locationType: "", + workshopCode: "", + productionLineCode: "", + spareField1: "", + spareField2: "", + remarks: "", + createUser: "", + createTime: "", + updateUser: "", + updateTime: "" + } +}; + +layui.use(['form', 'admin', 'ax','laydate','upload','formSelects'], function () { + var $ = layui.jquery; + var $ax = layui.ax; + var form = layui.form; + var admin = layui.admin; + + //鑾峰彇璇︽儏淇℃伅锛屽~鍏呰〃鍗� + var ajax = new $ax(Feng.ctxPath + "/locationInfo/detail?id=" + Feng.getUrlParam("id")); + var result1 = ajax.start(); + form.val('locationInfoForm', result1.data); + + $(document).ready(function () { + getDictType(); + $.ajax({ + type: "POST", + contentType: "application/json;charset=UTF-8", + url: Feng.ctxPath + '/workshopInfo/list', + success: function (result) { + $.each(result.data, function (index, value) { + $('#workshopCode').append(new Option(value.workshopCode));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + }); + $('#workshopCode').val(result1.data.workshopCode); + layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶 + }, + }); + $.ajax({ + type: "POST", + contentType: "application/json;charset=UTF-8", + url: Feng.ctxPath + '/lineInfo/list?workshopCode='+result1.data.workshopCode, + success: function (result) { + $.each(result.data, function (index, value) { + $('#productionLineCode').append(new Option(value.lineCode));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + }); + $('#productionLineCode').val(result1.data.productionLineCode); + layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶 + }, + }); + }); + form.on("select", function (data) { + if (data.value !== "") { + if (data.elem.id === "workshopCode") { + $.ajax({ + type: "POST", + contentType: "application/json;charset=UTF-8", + url: Feng.ctxPath + '/lineInfo/list?workshopCode='+data.value, + success: function (result) { + $('#productionLineCode').empty(); + $.each(result.data, function (index, value) { + $('#productionLineCode').append(new Option(value.lineCode));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + }); + $('#productionLineCode').val(result1.data.productionLineCode); + layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶 + }, + }); + } + } + }); + + function getDictType(){ + $.ajax({ + type: "POST", + contentType: "application/json;charset=UTF-8", + url: Feng.ctxPath + '/dict/list?dictTypeId=1703969868646158337', + success: function (result) { + $.each(result.data, function (index, value) { + $('#locationType').append(new Option(value.name,value.code));// 涓嬫媺鑿滃崟閲屾坊鍔犲厓绱� + }); + layui.form.render("select");//閲嶆柊娓叉煋 鍥哄畾鍐欐硶 + }, + }); + } + + //琛ㄥ崟鎻愪氦浜嬩欢 + form.on('submit(btnSubmit)', function (data) { + var ajax = new $ax(Feng.ctxPath + "/locationInfo/editItem", function (data) { + Feng.success("鏇存柊鎴愬姛锛�"); + window.location.href = Feng.ctxPath + '/locationInfo' + }, function (data) { + Feng.error("鏇存柊澶辫触锛�" + data.responseJSON.message) + }); + ajax.set(data.field); + ajax.start(); + + return false; + }); + + $('#cancel').click(function(){ + window.location.href = Feng.ctxPath + '/locationInfo' + }); +}); \ No newline at end of file diff --git a/guns-vip-main/src/main/webapp/pages/modular/bs/customInfo/customInfo.html b/guns-vip-main/src/main/webapp/pages/modular/bs/customInfo/customInfo.html new file mode 100644 index 0000000..085df67 --- /dev/null +++ b/guns-vip-main/src/main/webapp/pages/modular/bs/customInfo/customInfo.html @@ -0,0 +1,50 @@ +@layout("/common/_container.html",{js:["/assets/modular/bs/customInfo/customInfo.js"]}){ + +<div class="layui-body-header"> + <span class="layui-body-header-title">瀹㈡埛淇℃伅绠$悊</span> +</div> + +<div class="layui-fluid"> + <div class="layui-row layui-col-space15"> + <div class="layui-col-sm12 layui-col-md12 layui-col-lg12"> + <div class="layui-card"> + <div class="layui-card-body"> + <div class="layui-form toolbar"> + <div class="layui-form-item layui-row" > + <div class="layui-inline"> + 瀹㈡埛缂栧彿: + </div> + <div class="layui-inline"> + <input id="customerCode" class="layui-input" type="text" placeholder="瀹㈡埛缂栧彿"/> + </div> + <div class="layui-inline"> + 瀹㈡埛鍚嶇О: + </div> + <div class="layui-inline"> + <input id="customerName" class="layui-input" type="text" placeholder="瀹㈡埛鍚嶇О"/> + </div> + <div class="layui-inline"> + 瀹㈡埛绫诲瀷: + </div> + <div class="layui-inline"> + <input id="customerType" class="layui-input" type="text" placeholder="瀹㈡埛绫诲瀷"/> + </div> + <div class="layui-inline"> + <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon"></i>鎼滅储</button> + <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon"></i>娣诲姞</button> + <button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon"></i>瀵煎嚭</button> + </div> + </div> + </div> + <table class="layui-table" id="customInfoTable" lay-filter="customInfoTable"></table> + </div> + </div> + </div> + </div> +</div> + +<script type="text/html" id="tableBar"> + <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">淇敼</a> + <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">鍒犻櫎</a> +</script> +@} \ No newline at end of file diff --git a/guns-vip-main/src/main/webapp/pages/modular/bs/customInfo/customInfo_add.html b/guns-vip-main/src/main/webapp/pages/modular/bs/customInfo/customInfo_add.html new file mode 100644 index 0000000..dccf886 --- /dev/null +++ b/guns-vip-main/src/main/webapp/pages/modular/bs/customInfo/customInfo_add.html @@ -0,0 +1,52 @@ +@layout("/common/_form.html",{js:["/assets/modular/bs/customInfo/customInfo_add.js"],css:["/assets/expand/module/formSelects/formSelects-v4.css"]}){ + +<form class="layui-form" id="customInfoForm" lay-filter="customInfoForm"> + <div class="layui-fluid" style="padding-bottom: 75px;"> + <div class="layui-card"> + <div class="layui-card-header">鍩烘湰淇℃伅</div> + <div class="layui-card-body"> + <div class="layui-form-item layui-row"> + <input name="id" type="hidden"/> + + <div class="layui-inline layui-col-md12"> + <label class="layui-form-label">瀹㈡埛缂栧彿<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <input id="customerCode" name="customerCode" placeholder="璇疯緭鍏ュ鎴风紪鍙�" type="text" class="layui-input" lay-verify="required" required/> + </div> + </div> + <div class="layui-inline layui-col-md12"> + <label class="layui-form-label">瀹㈡埛鍚嶇О<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <input id="customerName" name="customerName" placeholder="璇疯緭鍏ュ鎴峰悕绉�" type="text" class="layui-input" lay-verify="required" required/> + </div> + </div> + <div class="layui-inline layui-col-md12"> + <label class="layui-form-label">瀹㈡埛绫诲瀷<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <input id="customerType" name="customerType" placeholder="璇疯緭鍏ュ鎴风被鍨�" type="text" class="layui-input" lay-verify="required" required/> + </div> + </div> + <div class="layui-inline layui-col-md12"> + <label class="layui-form-label">鑱旂郴鏂瑰紡</label> + <div class="layui-input-block"> + <input id="contact" name="contact" placeholder="璇疯緭鍏ヨ仈绯绘柟寮�" type="text" class="layui-input"/> + </div> + </div> + <div class="layui-inline layui-col-md12"> + <label class="layui-form-label">澶囨敞</label> + <div class="layui-input-block"> + <input id="remarks" name="remarks" placeholder="璇疯緭鍏ュ娉�" type="text" class="layui-input"/> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="form-group-bottom text-center"> + <button class="layui-btn" lay-filter="btnSubmit" lay-submit> 鎻愪氦 </button> + <button type="reset" class="layui-btn layui-btn-primary" id="cancel"> 鍙栨秷 </button> + </div> + +</form> + +@} \ No newline at end of file diff --git a/guns-vip-main/src/main/webapp/pages/modular/bs/customInfo/customInfo_edit.html b/guns-vip-main/src/main/webapp/pages/modular/bs/customInfo/customInfo_edit.html new file mode 100644 index 0000000..624efe8 --- /dev/null +++ b/guns-vip-main/src/main/webapp/pages/modular/bs/customInfo/customInfo_edit.html @@ -0,0 +1,52 @@ +@layout("/common/_form.html",{js:["/assets/modular/bs/customInfo/customInfo_edit.js"]}){ + +<form class="layui-form" id="customInfoForm" lay-filter="customInfoForm"> + <div class="layui-fluid" style="padding-bottom: 75px;"> + <div class="layui-card"> + <div class="layui-card-header">鍩烘湰淇℃伅</div> + <div class="layui-card-body"> + <div class="layui-form-item layui-row"> + <input name="id" type="hidden"/> + + <div class="layui-inline layui-col-md12"> + <label class="layui-form-label">瀹㈡埛缂栧彿<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <input id="customerCode" name="customerCode" placeholder="璇疯緭鍏ュ鎴风紪鍙�" type="text" class="layui-input" lay-verify="required" required/> + </div> + </div> + <div class="layui-inline layui-col-md12"> + <label class="layui-form-label">瀹㈡埛鍚嶇О<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <input id="customerName" name="customerName" placeholder="璇疯緭鍏ュ鎴峰悕绉�" type="text" class="layui-input" lay-verify="required" required/> + </div> + </div> + <div class="layui-inline layui-col-md12"> + <label class="layui-form-label">瀹㈡埛绫诲瀷<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <input id="customerType" name="customerType" placeholder="璇疯緭鍏ュ鎴风被鍨�" type="text" class="layui-input" lay-verify="required" required/> + </div> + </div> + <div class="layui-inline layui-col-md12"> + <label class="layui-form-label">鑱旂郴鏂瑰紡</label> + <div class="layui-input-block"> + <input id="contact" name="contact" placeholder="璇疯緭鍏ヨ仈绯绘柟寮�" type="text" class="layui-input"/> + </div> + </div> + <div class="layui-inline layui-col-md12"> + <label class="layui-form-label">澶囨敞</label> + <div class="layui-input-block"> + <input id="remarks" name="remarks" placeholder="璇疯緭鍏ュ娉�" type="text" class="layui-input"/> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="form-group-bottom text-center"> + <button class="layui-btn" lay-filter="btnSubmit" lay-submit> 鎻愪氦 </button> + <button type="reset" class="layui-btn layui-btn-primary" id="cancel"> 鍙栨秷 </button> + </div> + +</form> + +@} \ No newline at end of file diff --git a/guns-vip-main/src/main/webapp/pages/modular/bs/equipmentInfo/equipmentInfo.html b/guns-vip-main/src/main/webapp/pages/modular/bs/equipmentInfo/equipmentInfo.html new file mode 100644 index 0000000..8c5bb0e --- /dev/null +++ b/guns-vip-main/src/main/webapp/pages/modular/bs/equipmentInfo/equipmentInfo.html @@ -0,0 +1,62 @@ +@layout("/common/_container.html",{js:["/assets/modular/bs/equipmentInfo/equipmentInfo.js"]}){ + +<div class="layui-body-header"> + <span class="layui-body-header-title">璁惧妗f绠$悊</span> +</div> + +<div class="layui-fluid"> + <div class="layui-row layui-col-space15"> + <div class="layui-col-sm12 layui-col-md12 layui-col-lg12"> + <div class="layui-card"> + <div class="layui-card-body"> + <div class="layui-form toolbar"> + <div class="layui-form-item layui-row" > + <div class="layui-inline"> + 璁惧缂栧彿: + </div> + <div class="layui-inline"> + <input id="equipmentNo" class="layui-input" type="text" placeholder="璁惧缂栧彿"/> + </div> + <div class="layui-inline"> + 璁惧鍚嶇О: + </div> + <div class="layui-inline"> + <input id="equipmentName" class="layui-input" type="text" placeholder="璁惧鍚嶇О"/> + </div> + <div class="layui-inline"> + 璁惧绫诲瀷: + </div> + <div class="layui-inline"> + <input id="equipmentType" class="layui-input" type="text" placeholder="璁惧绫诲瀷"/> + </div> + <div class="layui-inline"> + 杞﹂棿缂栧彿: + </div> + <div class="layui-inline"> + <input id="workshopCode" class="layui-input" type="text" placeholder="杞﹂棿缂栧彿"/> + </div> + <div class="layui-inline"> + 浜х嚎缂栧彿: + </div> + <div class="layui-inline"> + <input id="productionLineCode" class="layui-input" type="text" placeholder="浜х嚎缂栧彿"/> + </div> + <div class="layui-inline"> + <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon"></i>鎼滅储</button> + <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon"></i>娣诲姞</button> + <button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon"></i>瀵煎嚭</button> + </div> + </div> + </div> + <table class="layui-table" id="equipmentInfoTable" lay-filter="equipmentInfoTable"></table> + </div> + </div> + </div> + </div> +</div> + +<script type="text/html" id="tableBar"> + <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">淇敼</a> + <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">鍒犻櫎</a> +</script> +@} \ No newline at end of file diff --git a/guns-vip-main/src/main/webapp/pages/modular/bs/equipmentInfo/equipmentInfo_add.html b/guns-vip-main/src/main/webapp/pages/modular/bs/equipmentInfo/equipmentInfo_add.html new file mode 100644 index 0000000..849605c --- /dev/null +++ b/guns-vip-main/src/main/webapp/pages/modular/bs/equipmentInfo/equipmentInfo_add.html @@ -0,0 +1,82 @@ +@layout("/common/_form.html",{js:["/assets/modular/bs/equipmentInfo/equipmentInfo_add.js"],css:["/assets/expand/module/formSelects/formSelects-v4.css"]}){ + +<form class="layui-form" id="equipmentInfoForm" lay-filter="equipmentInfoForm"> + <div class="layui-fluid" style="padding-bottom: 75px;"> + <div class="layui-card"> + <div class="layui-card-header">鍩烘湰淇℃伅</div> + <div class="layui-card-body"> + <div class="layui-form-item layui-row"> + <input name="id" type="hidden"/> + + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">璁惧缂栧彿<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <input id="equipmentNo" name="equipmentNo" placeholder="璇疯緭鍏ヨ澶囩紪鍙�" type="text" class="layui-input" lay-verify="required" required/> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">璁惧鍚嶇О<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <input id="equipmentName" name="equipmentName" placeholder="璇疯緭鍏ヨ澶囧悕绉�" type="text" class="layui-input" lay-verify="required" required/> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">璁惧绫诲瀷<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <input id="equipmentType" name="equipmentType" placeholder="璇疯緭鍏ヨ澶囩被鍨�" type="text" class="layui-input" lay-verify="required" required/> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">瑙勬牸鍨嬪彿</label> + <div class="layui-input-block"> + <input id="equipmentModel" name="equipmentModel" placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�" type="text" class="layui-input"/> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">杞﹂棿缂栧彿<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <select id="workshopCode" name="workshopCode" lay-filter="workshopCode"> + <option value="">杞﹂棿缂栧彿</option> + </select> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">浜х嚎缂栧彿<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <select id="productionLineCode" name="productionLineCode" lay-filter="productionLineCode"> + <option value="">浜х嚎缂栧彿</option> + </select> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">宸ヤ綅缂栧彿<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <select id="locationCode" name="locationCode" lay-filter="locationCode"> + <option value="">宸ヤ綅缂栧彿</option> + </select> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">渚涘簲鍟嗙紪鍙�</label> + <div class="layui-input-block"> + <input id="supplierCode" name="supplierCode" placeholder="璇疯緭鍏ヤ緵搴斿晢缂栧彿" type="text" class="layui-input"/> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">澶囨敞</label> + <div class="layui-input-block"> + <input id="remark" name="remark" placeholder="璇疯緭鍏ュ娉�" type="text" class="layui-input"/> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="form-group-bottom text-center"> + <button class="layui-btn" lay-filter="btnSubmit" lay-submit> 鎻愪氦 </button> + <button type="reset" class="layui-btn layui-btn-primary" id="cancel"> 鍙栨秷 </button> + </div> + +</form> + +@} \ No newline at end of file diff --git a/guns-vip-main/src/main/webapp/pages/modular/bs/equipmentInfo/equipmentInfo_edit.html b/guns-vip-main/src/main/webapp/pages/modular/bs/equipmentInfo/equipmentInfo_edit.html new file mode 100644 index 0000000..0f84ca7 --- /dev/null +++ b/guns-vip-main/src/main/webapp/pages/modular/bs/equipmentInfo/equipmentInfo_edit.html @@ -0,0 +1,82 @@ +@layout("/common/_form.html",{js:["/assets/modular/bs/equipmentInfo/equipmentInfo_edit.js"]}){ + +<form class="layui-form" id="equipmentInfoForm" lay-filter="equipmentInfoForm"> + <div class="layui-fluid" style="padding-bottom: 75px;"> + <div class="layui-card"> + <div class="layui-card-header">鍩烘湰淇℃伅</div> + <div class="layui-card-body"> + <div class="layui-form-item layui-row"> + <input name="id" type="hidden"/> + + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">璁惧缂栧彿<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <input id="equipmentNo" name="equipmentNo" placeholder="璇疯緭鍏ヨ澶囩紪鍙�" type="text" class="layui-input" lay-verify="required" required/> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">璁惧鍚嶇О<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <input id="equipmentName" name="equipmentName" placeholder="璇疯緭鍏ヨ澶囧悕绉�" type="text" class="layui-input" lay-verify="required" required/> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">璁惧绫诲瀷<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <input id="equipmentType" name="equipmentType" placeholder="璇疯緭鍏ヨ澶囩被鍨�" type="text" class="layui-input" lay-verify="required" required/> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">瑙勬牸鍨嬪彿</label> + <div class="layui-input-block"> + <input id="equipmentModel" name="equipmentModel" placeholder="璇疯緭鍏ヨ鏍煎瀷鍙�" type="text" class="layui-input"/> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">杞﹂棿缂栧彿<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <select id="workshopCode" name="workshopCode" lay-filter="workshopCode"> + <option value="">杞﹂棿缂栧彿</option> + </select> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">浜х嚎缂栧彿<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <select id="productionLineCode" name="productionLineCode" lay-filter="productionLineCode"> + <option value="">浜х嚎缂栧彿</option> + </select> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">宸ヤ綅缂栧彿<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <select id="locationCode" name="locationCode" lay-filter="locationCode"> + <option value="">宸ヤ綅缂栧彿</option> + </select> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">渚涘簲鍟嗙紪鍙�</label> + <div class="layui-input-block"> + <input id="supplierCode" name="supplierCode" placeholder="璇疯緭鍏ヤ緵搴斿晢缂栧彿" type="text" class="layui-input"/> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">澶囨敞</label> + <div class="layui-input-block"> + <input id="remark" name="remark" placeholder="璇疯緭鍏ュ娉�" type="text" class="layui-input"/> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="form-group-bottom text-center"> + <button class="layui-btn" lay-filter="btnSubmit" lay-submit> 鎻愪氦 </button> + <button type="reset" class="layui-btn layui-btn-primary" id="cancel"> 鍙栨秷 </button> + </div> + +</form> + +@} \ No newline at end of file diff --git a/guns-vip-main/src/main/webapp/pages/modular/bs/locationInfo/locationInfo.html b/guns-vip-main/src/main/webapp/pages/modular/bs/locationInfo/locationInfo.html new file mode 100644 index 0000000..c470a0f --- /dev/null +++ b/guns-vip-main/src/main/webapp/pages/modular/bs/locationInfo/locationInfo.html @@ -0,0 +1,65 @@ +@layout("/common/_container.html",{js:["/assets/modular/bs/locationInfo/locationInfo.js"]}){ + +<div class="layui-body-header"> + <span class="layui-body-header-title">宸ヤ綅淇℃伅绠$悊</span> +</div> + +<div class="layui-fluid"> + <div class="layui-row layui-col-space15"> + <div class="layui-col-sm12 layui-col-md12 layui-col-lg12"> + <div class="layui-card"> + <div class="layui-card-body"> + <div class="layui-form toolbar"> + <div class="layui-form-item"> + <div class="layui-inline"> + 宸ヤ綅缂栧彿 + </div> + <div class="layui-inline"> + <input id="locationCode" class="layui-input" type="text" placeholder="宸ヤ綅缂栧彿"/> + </div> + <div class="layui-inline"> + 宸ヤ綅鍚嶇О + </div> + <div class="layui-inline"> + <input id="locationName" class="layui-input" type="text" placeholder="宸ヤ綅鍚嶇О"/> + </div> + <div class="layui-inline"> + 宸ヤ綅绫诲瀷 + </div> + <div class="layui-inline"> +<!-- <input id="locationType" class="layui-input" type="text" placeholder="宸ヤ綅绫诲瀷"/>--> + <select id="locationType" name="locationType" lay-filter="locationType"> + <option value="">宸ヤ綅绫诲瀷</option> + </select> + </div> + <div class="layui-inline"> + 杞﹂棿缂栧彿 + </div> + <div class="layui-inline"> + <input id="workshopCode" class="layui-input" type="text" placeholder="杞﹂棿缂栧彿"/> + </div> + <div class="layui-inline"> + 浜х嚎缂栧彿 + </div> + <div class="layui-inline"> + <input id="productionLineCode" class="layui-input" type="text" placeholder="浜х嚎缂栧彿"/> + </div> + <div class="layui-inline"> + <button id="btnSearch" class="layui-btn icon-btn"><i class="layui-icon"></i>鎼滅储</button> + <button id="btnAdd" class="layui-btn icon-btn"><i class="layui-icon"></i>娣诲姞</button> + <button id="btnExp" class="layui-btn icon-btn"><i class="layui-icon"></i>瀵煎嚭</button> + </div> + </div> + </div> + <table class="layui-table" id="locationInfoTable" lay-filter="locationInfoTable"></table> + </div> + </div> + </div> + </div> +</div> + +<script type="text/html" id="tableBar"> + <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">淇敼</a> + <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">鍒犻櫎</a> +</script> +@} \ No newline at end of file diff --git a/guns-vip-main/src/main/webapp/pages/modular/bs/locationInfo/locationInfo_add.html b/guns-vip-main/src/main/webapp/pages/modular/bs/locationInfo/locationInfo_add.html new file mode 100644 index 0000000..eb16204 --- /dev/null +++ b/guns-vip-main/src/main/webapp/pages/modular/bs/locationInfo/locationInfo_add.html @@ -0,0 +1,64 @@ +@layout("/common/_form.html",{js:["/assets/modular/bs/locationInfo/locationInfo_add.js"],css:["/assets/expand/module/formSelects/formSelects-v4.css"]}){ + +<form class="layui-form" id="locationInfoForm" lay-filter="locationInfoForm"> + <div class="layui-fluid" style="padding-bottom: 75px;"> + <div class="layui-card"> + <div class="layui-card-header">鍩烘湰淇℃伅</div> + <div class="layui-card-body"> + <div class="layui-form-item layui-row"> + <input name="id" type="hidden"/> + + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">宸ヤ綅缂栧彿<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <input id="locationCode" name="locationCode" placeholder="璇疯緭鍏ュ伐浣嶇紪鍙�" type="text" class="layui-input" lay-verify="required" required/> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">宸ヤ綅鍚嶇О<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <input id="locationName" name="locationName" placeholder="璇疯緭鍏ュ伐浣嶅悕绉�" type="text" class="layui-input" lay-verify="required" required/> + </div> + </div> + <div class="layui-inline layui-col-md12"> + <label class="layui-form-label">宸ヤ綅绫诲瀷<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <select id="locationType" name="locationType" lay-filter="locationType"> + <option value="">宸ヤ綅绫诲瀷</option> + </select> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">杞﹂棿缂栧彿<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <select id="workshopCode" name="workshopCode" lay-filter="workshopCode"> + <option value="">杞﹂棿缂栧彿</option> + </select> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">浜х嚎缂栧彿<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <select id="productionLineCode" name="productionLineCode" lay-filter="productionLineCode"> + <option value="">浜х嚎缂栧彿</option> + </select> + </div> + </div> + <div class="layui-inline layui-col-md12"> + <label class="layui-form-label">澶囨敞</label> + <div class="layui-input-block"> + <textarea id="remarks" name="remarks" placeholder="璇疯緭鍏ュ娉�" class="layui-textarea"></textarea> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="form-group-bottom text-center"> + <button class="layui-btn" lay-filter="btnSubmit" lay-submit> 鎻愪氦 </button> + <button type="reset" class="layui-btn layui-btn-primary" id="cancel"> 鍙栨秷 </button> + </div> + +</form> + +@} \ No newline at end of file diff --git a/guns-vip-main/src/main/webapp/pages/modular/bs/locationInfo/locationInfo_edit.html b/guns-vip-main/src/main/webapp/pages/modular/bs/locationInfo/locationInfo_edit.html new file mode 100644 index 0000000..8ab1cd1 --- /dev/null +++ b/guns-vip-main/src/main/webapp/pages/modular/bs/locationInfo/locationInfo_edit.html @@ -0,0 +1,64 @@ +@layout("/common/_form.html",{js:["/assets/modular/bs/locationInfo/locationInfo_edit.js"]}){ + +<form class="layui-form" id="locationInfoForm" lay-filter="locationInfoForm"> + <div class="layui-fluid" style="padding-bottom: 75px;"> + <div class="layui-card"> + <div class="layui-card-header">鍩烘湰淇℃伅</div> + <div class="layui-card-body"> + <div class="layui-form-item layui-row"> + <input name="id" type="hidden"/> + + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">宸ヤ綅缂栧彿<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <input id="locationCode" name="locationCode" placeholder="璇疯緭鍏ュ伐浣嶇紪鍙�" type="text" class="layui-input" lay-verify="required" required/> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">宸ヤ綅鍚嶇О<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <input id="locationName" name="locationName" placeholder="璇疯緭鍏ュ伐浣嶅悕绉�" type="text" class="layui-input" lay-verify="required" required/> + </div> + </div> + <div class="layui-inline layui-col-md12"> + <label class="layui-form-label">宸ヤ綅绫诲瀷<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <select id="locationType" name="locationType" lay-filter="locationType"> + <option value="">宸ヤ綅绫诲瀷</option> + </select> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">杞﹂棿缂栧彿<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <select id="workshopCode" name="workshopCode" lay-filter="workshopCode"> + <option value="">杞﹂棿缂栧彿</option> + </select> + </div> + </div> + <div class="layui-inline layui-col-md6"> + <label class="layui-form-label">浜х嚎缂栧彿<span style="color: red;">*</span></label> + <div class="layui-input-block"> + <select id="productionLineCode" name="productionLineCode" lay-filter="productionLineCode"> + <option value="">浜х嚎缂栧彿</option> + </select> + </div> + </div> + <div class="layui-inline layui-col-md12"> + <label class="layui-form-label">澶囨敞</label> + <div class="layui-input-block"> + <textarea id="remarks" name="remarks" placeholder="璇疯緭鍏ュ娉�" class="layui-textarea"></textarea> + </div> + </div> + </div> + </div> + </div> + </div> + <div class="form-group-bottom text-center"> + <button class="layui-btn" lay-filter="btnSubmit" lay-submit> 鎻愪氦 </button> + <button type="reset" class="layui-btn layui-btn-primary" id="cancel"> 鍙栨秷 </button> + </div> + +</form> + +@} \ No newline at end of file -- Gitblit v1.9.3