Browse Source

[update]销售模块:客户资料添加其他信息功能模块

dev
zhangsiqi 7 months ago
parent
commit
56387d3fd8
  1. 46
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialController.java
  2. 20
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysErpMaterialSysTechnicalTeam.java
  3. 14
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysErpMaterialSysTechnicalTeamMapper.java
  4. 14
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysErpMaterialSysTechnicalTeamService.java
  5. 39
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/ISysErpMaterialSysTechnicalTeamIpml.java
  6. 50
      ruoyi-admin/src/main/resources/mapper/system/SysErpMaterialSysTachnicalTeamMapper.xml
  7. 21
      ruoyi-admin/src/main/resources/templates/erp/material/material.html
  8. 7
      ruoyi-admin/src/main/resources/templates/erp/material/select.html

46
ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpMaterialController.java

@ -13,9 +13,9 @@ import com.ruoyi.erp.domain.ErpMaterialVo;
import com.ruoyi.erp.mapper.ErpMaterialMapper;
import com.ruoyi.erp.service.IErpMaterialService;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.system.domain.SysErpMaterialProductItem;
import com.ruoyi.system.service.ISysErpMaterialProductItemService;
import com.ruoyi.system.service.ISysProductItemService;
import com.ruoyi.system.domain.SysErpMaterialSysTechnicalTeam;
import com.ruoyi.system.service.ISysErpMaterialSysTechnicalTeamService;
import com.ruoyi.system.service.ISysTechnicalTeamService;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.service.ISysUserService;
import org.activiti.engine.RuntimeService;
@ -47,14 +47,12 @@ import java.util.Set;
public class ErpMaterialController extends BaseController
{
private String prefix = "erp/material";
@Autowired
private ISysProductItemService sysProductItemService;
@Autowired
private IErpMaterialService erpMaterialService;
@Autowired
private ISysErpMaterialProductItemService erpMaterialProductItemService;
private ISysErpMaterialSysTechnicalTeamService erpMaterialSysTechnicalTeamService;
@Autowired
private ISysRoleService roleService;
@ -315,20 +313,20 @@ public class ErpMaterialController extends BaseController
@ResponseBody
public String addErpMaterialProduct(ErpMaterial material)
{
SysErpMaterialProductItem sysErpMaterialProductItem = new SysErpMaterialProductItem();
sysErpMaterialProductItem.setMaterialId(material.getMaterialNo());
sysErpMaterialProductItem.setProductItemId(material.getSysProductItems()+"");
return String.valueOf(toAjax(erpMaterialProductItemService.insertSysErpMaterialProductItem(sysErpMaterialProductItem)));
SysErpMaterialSysTechnicalTeam sysErpMaterialTechnicalTeam = new SysErpMaterialSysTechnicalTeam();
sysErpMaterialTechnicalTeam.setMaterialId(material.getMaterialNo());
sysErpMaterialTechnicalTeam.setMaterialId(material.getSysTechnicalTeams()+"");
return String.valueOf(toAjax(erpMaterialSysTechnicalTeamService.insertSysErpMaterialSysTechnicalTeam(sysErpMaterialTechnicalTeam)));
}
@PostMapping("/editMaterialProduct")
@ResponseBody
public String editMaterialProduct(ErpMaterial material)
{
SysErpMaterialProductItem sysErpMaterialProductItem = new SysErpMaterialProductItem();
sysErpMaterialProductItem.setMaterialId(material.getMaterialNo());
sysErpMaterialProductItem.setProductItemId(material.getSysProductItems()+"");
return String.valueOf(toAjax(erpMaterialProductItemService.insertSysErpMaterialProductItem(sysErpMaterialProductItem)));
SysErpMaterialSysTechnicalTeam sysErpMaterialTechnicalTeam = new SysErpMaterialSysTechnicalTeam();
sysErpMaterialTechnicalTeam.setMaterialId(material.getMaterialNo());
sysErpMaterialTechnicalTeam.setMaterialId(material.getSysTechnicalTeams()+"");
return String.valueOf(toAjax(erpMaterialSysTechnicalTeamService.insertSysErpMaterialSysTechnicalTeam(sysErpMaterialTechnicalTeam)));
}
/**
* 审核信息
@ -354,7 +352,7 @@ public class ErpMaterialController extends BaseController
@Log(title = "物料信息使用状态", businessType = BusinessType.RESTORE)
@PostMapping( "/userStatusMaterial")
@ResponseBody
public String materialProductItems(ErpMaterial erpMaterial){
public String materialTechnicalTeams(ErpMaterial erpMaterial){
return "暂未启用功能";
}
/**
@ -364,12 +362,12 @@ public class ErpMaterialController extends BaseController
@Log(title = "物料信息的技术团队", businessType = BusinessType.RESTORE)
@PostMapping( "/getMItem")
@ResponseBody
public TableDataInfo getMaterialProductItems(ErpMaterial erpMaterial){
public TableDataInfo getMaterialTechnicalTeams(ErpMaterial erpMaterial){
//获取item中建表的
ModelMap model = new ModelMap();
SysErpMaterialProductItem sysErpMaterialProductItem = new SysErpMaterialProductItem();
sysErpMaterialProductItem.setMaterialId(erpMaterial.getMaterialNo());
List<SysErpMaterialProductItem> productItemslist = erpMaterialProductItemService.selectSysMaterialProductItemList(sysErpMaterialProductItem);
SysErpMaterialSysTechnicalTeam sysErpMaterialTechnicalTeam = new SysErpMaterialSysTechnicalTeam();
sysErpMaterialTechnicalTeam.setMaterialId(erpMaterial.getMaterialNo());
List<SysErpMaterialSysTechnicalTeam> productItemslist = erpMaterialSysTechnicalTeamService.selectSysMaterialSysTechnicalTeamList(sysErpMaterialTechnicalTeam);
return getDataTable(productItemslist);
}
@ -377,13 +375,13 @@ public class ErpMaterialController extends BaseController
@Log(title = "物料信息", businessType = BusinessType.RESTORE)
@PostMapping( "/getMItemsss")
@ResponseBody
public String getMaterialProductItem(ErpMaterial erpMaterial){
public String getMaterialTechnicalTeam(ErpMaterial erpMaterial){
//获取item中建表的
ModelMap model = new ModelMap();
SysErpMaterialProductItem sysErpMaterialProductItem = new SysErpMaterialProductItem();
sysErpMaterialProductItem.setMaterialId(erpMaterial.getMaterialNo());
sysErpMaterialProductItem.setProductItemId(erpMaterial.getProductItem());
erpMaterialProductItemService.insertSysErpMaterialProductItem(sysErpMaterialProductItem);
SysErpMaterialSysTechnicalTeam sysErpMaterialTechnicalTeam = new SysErpMaterialSysTechnicalTeam();
sysErpMaterialTechnicalTeam.setMaterialId(erpMaterial.getMaterialNo());
sysErpMaterialTechnicalTeam.setTechnicalTeam(erpMaterial.getSysTechnicalTeams()+ "");
erpMaterialSysTechnicalTeamService.insertSysErpMaterialSysTechnicalTeam(sysErpMaterialTechnicalTeam);
return "保存成功";
}

20
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysErpMaterialProductItem.java → ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysErpMaterialSysTechnicalTeam.java

@ -3,20 +3,20 @@ package com.ruoyi.system.domain;
/**
* 物料信息表与技术团体配置信息关联表
*/
public class SysErpMaterialProductItem {
public class SysErpMaterialSysTechnicalTeam{
// 关联表id
private Long iconId;
private Long id;
//物料信息Id
private String materialId;
//技术团队id
private String productItemId;
private String technicalTeamId;
public Long getIconId() {
return iconId;
return id;
}
public void setIconId(Long iconId) {
this.iconId = iconId;
public void setIconId(Long id) {
this.id = id;
}
public String getMaterialId() {
@ -27,11 +27,11 @@ public class SysErpMaterialProductItem {
this.materialId = materialId;
}
public String getProductItemId() {
return productItemId;
public String getTechnicalTeam() {
return technicalTeamId;
}
public void setProductItemId(String productItemId) {
this.productItemId = productItemId;
public void setTechnicalTeam(String technicalTeamId) {
this.technicalTeamId = technicalTeamId;
}
}

14
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysErpMaterialSysTechnicalTeamMapper.java

@ -0,0 +1,14 @@
package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.SysErpMaterialSysTechnicalTeam;
import java.util.List;
public interface SysErpMaterialSysTechnicalTeamMapper {
List<SysErpMaterialSysTechnicalTeam> selectSysMaterialSysTechnicalTeamList(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam);
SysErpMaterialSysTechnicalTeam selectSysMaterialSysTechnicalTeamListById(Long iconId);
Integer insertSysErpMaterialSysTechnicalTeam(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam);
Integer deleteSysErpMaterialSysTechnicalTeam(List<Long> list);
Integer updateSysErpMaterialSysTechnicalTeam(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam);
}

14
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysErpMaterialSysTechnicalTeamService.java

@ -0,0 +1,14 @@
package com.ruoyi.system.service;
import com.ruoyi.system.domain.SysErpMaterialSysTechnicalTeam;
import java.util.List;
public interface ISysErpMaterialSysTechnicalTeamService {
public List<SysErpMaterialSysTechnicalTeam> selectSysMaterialSysTechnicalTeamList(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam);
public SysErpMaterialSysTechnicalTeam selectSysMaterialSysTechnicalTeamListById(Long iconId);
public Integer insertSysErpMaterialSysTechnicalTeam(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam);
public Integer deleteSysErpMaterialSysTechnicalTeam(List<Long> list);
public Integer updateSysErpMaterialSysTechnicalTeam(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam);
}

39
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/ISysErpMaterialSysTechnicalTeamIpml.java

@ -0,0 +1,39 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.system.domain.SysErpMaterialSysTechnicalTeam;
import com.ruoyi.system.mapper.SysErpMaterialSysTechnicalTeamMapper;
import com.ruoyi.system.service.ISysErpMaterialSysTechnicalTeamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ISysErpMaterialSysTechnicalTeamIpml implements ISysErpMaterialSysTechnicalTeamService {
@Autowired
private SysErpMaterialSysTechnicalTeamMapper sysErpMaterialSysTechnicalTeamMapper;
@Override
public List<SysErpMaterialSysTechnicalTeam> selectSysMaterialSysTechnicalTeamList(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam) {
return sysErpMaterialSysTechnicalTeamMapper.selectSysMaterialSysTechnicalTeamList(sysErpMaterialSysTechnicalTeam);
}
@Override
public SysErpMaterialSysTechnicalTeam selectSysMaterialSysTechnicalTeamListById(Long iconId) {
return sysErpMaterialSysTechnicalTeamMapper.selectSysMaterialSysTechnicalTeamListById(iconId);
}
@Override
public Integer insertSysErpMaterialSysTechnicalTeam(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam) {
return sysErpMaterialSysTechnicalTeamMapper.insertSysErpMaterialSysTechnicalTeam(sysErpMaterialSysTechnicalTeam);
}
@Override
public Integer deleteSysErpMaterialSysTechnicalTeam(List<Long> list) {
return sysErpMaterialSysTechnicalTeamMapper.deleteSysErpMaterialSysTechnicalTeam(list);
}
@Override
public Integer updateSysErpMaterialSysTechnicalTeam(SysErpMaterialSysTechnicalTeam sysErpMaterialSysTechnicalTeam) {
return sysErpMaterialSysTechnicalTeamMapper.updateSysErpMaterialSysTechnicalTeam(sysErpMaterialSysTechnicalTeam);
}
}

50
ruoyi-admin/src/main/resources/mapper/system/SysErpMaterialSysTachnicalTeamMapper.xml

@ -0,0 +1,50 @@
<?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="com.ruoyi.system.mapper.SysErpMaterialSysTechnicalTeamMapper">
<resultMap type="SysErpMaterialSysTechnicalTeam" id="SysErpMaterialSysTechnicalTeamResult">
<result property="icon_id" column="id" />
<result property="materialId" column="material_id" />
<result property="technicalTeamIdId" column="technical_team_id" />
</resultMap>
<sql id="selectSysErpMaterialSysTechnicalTeamVo">
select icon_id,material_id,technical_team_id from
sys_erpmaterial_technical
</sql>
<select id="selectSysErpMaterialSysTechnicalTeamList">
<include refid="selectSysErpMaterialSysTechnicalTeamVo"/>
</select>
<select id="selectSysErpMaterialSysTechnicalTeamByList" parameterType="SysErpMaterialSysTechnicalTeam" resultMap="SysErpMaterialSysTechnicalTeamResult">
<include refid="selectSysErpMaterialSysTechnicalTeamVo"/>
<where>
<if test="materialId != null"> and material_id = #{materialId}</if>
<if test="technicalTeamIdId != null"> and technical_team_id = #{technicalTeamIdId}</if>
</where>
</select>
<insert id="insertSysErpMaterialSysTechnicalTeam" useGeneratedKeys="true" keyProperty="iconId">
insert into sys_erpmaterial_technical(`material_id`,`technical_team_id`) values (#{materialId},#{technicalTeamId})
</insert>
<delete id="deleteSysErpMaterialSysTechnicalTeam">
delete from sys_erpmaterial_technical
where iconId in
<foreach collection="list" open="(" separator="," close=")" item="id">
#{id}
</foreach>
</delete>
<update id="updateSysErpMaterialSysTechnicalTeam" parameterType="SysErpMaterialSysTechnicalTeam">
update sys_erpmaterial_technical set
material_id = #{materialId},technical_team_id = #{technicalTeamId}
where icon_id in
<foreach collection="list" open="(" separator="," close=")" item="id">
#{id}
</foreach>
</update>
<select id="selectSysMaterialSysTechnicalTeamListById" parameterType="Long" resultMap="SysErpMaterialSysTechnicalTeamResult">
<include refid="selectSysErpMaterialSysTechnicalTeamVo"/>
where icon_id = #{id}
</select>
</mapper>

21
ruoyi-admin/src/main/resources/templates/erp/material/material.html

@ -123,8 +123,8 @@
<div class="modal-dialog">
<div class="modal-content message_align">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span></button>
<h4 class="modal-title">技术团队配置</h4>
</div>
<div class="modal-body">
@ -132,31 +132,28 @@
<div class="form-group col-sm-6">
<label class="col-sm-4 col-form-label">料号:</label>
<div class="col-sm-8">
<input type="text" name="materialNo" class="form-control" readonly>
<input type="text" name="materialNo" class="form-control" disabled />
</div>
</div>
<div class="form-group col-sm-6">
<label class="col-sm-4 col-form-label">物料名称:</label>
<div class="col-sm-8">
<input type="text" name="materialName" class="form-control" readonly>
<input type="text" name="materialName" class="form-control" disabled />
</div>
</div>
<input name="itemId" type="hidden">
<div class="form-group col-sm-6">
<label class="col-sm-4 col-form-label">生产团队ID:</label>
<div class="col-sm-8">
<select name="id" class="form-control-sm" required>
<option></option>
<!-- 添加具体的团队ID选项 -->
<option value=""></option>
</select>
</div>
</div>
<div class="form-group col-sm-6">
<label class="col-sm-4 col-form-label">生产团队名称:</label>
<div class="col-sm-8">
<select name="productItem" class="form-control-sm" required>
<select name="productItem" class="form-control" required>
<option></option>
<!-- 添加具体的团队名称选项 -->
</select>
</div>
</div>
@ -174,7 +171,6 @@
<div class="col-sm-3">
<label class="control-label">软件技术人员:</label>
</div>
<div class="w-100"></div> <!-- Add a clearfix to wrap the next row -->
<div class="col-sm-3">
<label class="control-label">测试技术人员:</label>
</div>
@ -187,7 +183,6 @@
<div class="col-sm-3">
<label class="control-label">经理:</label>
</div>
<div class="w-100"></div> <!-- Add a clearfix to wrap the next row -->
<div class="col-sm-3">
<label class="control-label">总监:</label>
</div>
@ -205,7 +200,6 @@
<div class="col-sm-3">
<input name="soft" class="form-control" type="text" readonly>
</div>
<div class="w-100"></div> <!-- Add a clearfix to wrap the next row -->
<div class="col-sm-3">
<input name="test" class="form-control" type="text" readonly>
</div>
@ -217,8 +211,7 @@
</div>
<div class="col-sm-3">
<input name="manger" class="form-control" type="text" readonly>
</div>
<div class="w-100"></div> <!-- Add a clearfix to wrap the next row -->
</div>-->
<div class="col-sm-3">
<input name="director" class="form-control" type="text" readonly>
</div>

7
ruoyi-admin/src/main/resources/templates/erp/material/select.html

@ -66,6 +66,13 @@
field: 'materialNo',
title: '料号'
},
{
title: '图片',
field:'photoUrl',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{
field: 'materialName',
title: '物料名称'

Loading…
Cancel
Save