人员物料绑定查询修改

highway
shaoyong 11 months ago
parent ac16a5d785
commit ee48170cc8

@ -99,4 +99,12 @@ public class QcCheckTypeProjectController extends BaseController {
public AjaxResult remove(@PathVariable String[] ids) { public AjaxResult remove(@PathVariable String[] ids) {
return toAjax(qcCheckTypeProjectService.deleteQcCheckTypeProjectByIds(ids)); return toAjax(qcCheckTypeProjectService.deleteQcCheckTypeProjectByIds(ids));
} }
/**
*
*/
@Log(title = "物料检验项目维护", businessType = BusinessType.UPDATE)
@PutMapping("/changeStatus")
public AjaxResult changeStatus(@RequestBody QcCheckTypeProject qcCheckTypeProject) {
return toAjax(qcCheckTypeProjectService.changeStatus(qcCheckTypeProject));
}
} }

@ -57,4 +57,8 @@ public interface IQcCheckTypeProjectService {
* @return * @return
*/ */
public int deleteQcCheckTypeProjectById(String id); public int deleteQcCheckTypeProjectById(String id);
/**
*
*/
public int changeStatus(QcCheckTypeProject qcCheckTypeProject);
} }

@ -106,4 +106,12 @@ public class QcCheckTypeProjectServiceImpl implements IQcCheckTypeProjectService
public int deleteQcCheckTypeProjectById(String id) { public int deleteQcCheckTypeProjectById(String id) {
return qcCheckTypeProjectMapper.deleteQcCheckTypeProjectById(id); return qcCheckTypeProjectMapper.deleteQcCheckTypeProjectById(id);
} }
@Override
@DS("#header.poolName")
public int changeStatus(QcCheckTypeProject qcCheckTypeProject) {
qcCheckTypeProject.setUpdateBy(SecurityUtils.getUsername());
qcCheckTypeProject.setUpdateTime(DateUtils.getNowDate());
return qcCheckTypeProjectMapper.updateQcCheckTypeProject(qcCheckTypeProject);
}
} }

@ -28,7 +28,6 @@ import javax.servlet.http.HttpServletRequest;
public class QcUserMaterialServiceImpl implements IQcUserMaterialService { public class QcUserMaterialServiceImpl implements IQcUserMaterialService {
@Autowired @Autowired
private QcUserMaterialMapper qcUserMaterialMapper; private QcUserMaterialMapper qcUserMaterialMapper;
@Override @Override
public List<QcUserMaterial> selectUserList(QcUserMaterial qcUserMaterial) { public List<QcUserMaterial> selectUserList(QcUserMaterial qcUserMaterial) {
return qcUserMaterialMapper.selectUserList( qcUserMaterial); return qcUserMaterialMapper.selectUserList( qcUserMaterial);

@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND ctp.del_flag = '0' AND ctp.del_flag = '0'
<if test="projectId != null and projectId != ''"> and ctp.project_id = #{projectId}</if> <if test="projectId != null and projectId != ''"> and ctp.project_id = #{projectId}</if>
<if test="typeId != null and typeId != ''"> and ctp.type_id = #{typeId}</if> <if test="typeId != null and typeId != ''"> and ctp.type_id = #{typeId}</if>
<if test="standardValue != null and standardValue != ''"> and ctp.standard_value = #{standardValue}</if> <if test="standardValue != null and standardValue != ''"> and ctp.standard_value like concat('%', #{standardValue}, '%')</if>
<if test="upperDiff != null "> and ctp.upper_diff = #{upperDiff}</if> <if test="upperDiff != null "> and ctp.upper_diff = #{upperDiff}</if>
<if test="downDiff != null "> and ctp.down_diff = #{downDiff}</if> <if test="downDiff != null "> and ctp.down_diff = #{downDiff}</if>
<if test="sample != null "> and ctp.sample = #{sample}</if> <if test="sample != null "> and ctp.sample = #{sample}</if>

@ -28,26 +28,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
create_by, create_time, update_by, update_time, factory_code, del_flag from qc_user_material create_by, create_time, update_by, update_time, factory_code, del_flag from qc_user_material
</sql> </sql>
<select id="selectUserList" parameterType="QcUserMaterial" resultMap="QcUserMaterialResult"> <select id="selectUserList" parameterType="QcUserMaterial" resultType="com.op.quality.domain.QcUserMaterial">
SELECT SELECT
t.user_id, user_id as userId,
t.user_name as user_code, user_name as userCode,
t.nick_name as user_name, nick_name as userName,
t.phonenumber, phonenumber,
t.email, email,
STRING_AGG(bp.product_desc_zh, ',') materialNames, status,
t.status, create_time
t.create_time FROM sys_user
FROM WHERE del_flag = '0'
sys_user t <if test="userName != null and userName != ''"> and nick_name like concat('%', #{userName}, '%')</if>
LEFT JOIN lanju_op_xiaolan_ds.dbo.qc_user_material um ON um.user_code = t.user_name <if test="phonenumber != null and phonenumber != ''"> and phonenumber like concat('%', #{phonenumber}, '%')</if>
LEFT JOIN lanju_op_xiaolan_ds.dbo.base_product bp ON bp.product_code = um.material_code
WHERE t.del_flag = '0'
<if test="userName != null and userName != ''"> and t.nick_name like concat('%', #{userName}, '%')</if>
<if test="phonenumber != null and phonenumber != ''"> and t.phonenumber like concat('%', #{phonenumber}, '%')</if>
GROUP BY t.user_id,t.user_name,t.nick_name,t.phonenumber,t.email,t.status,t.create_time
</select> </select>
<select id="selectQcUserMaterialList" parameterType="QcUserMaterial" resultMap="QcUserMaterialResult"> <select id="selectQcUserMaterialList" parameterType="QcUserMaterial" resultMap="QcUserMaterialResult">
@ -57,12 +50,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if> <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if> <if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if> <if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if> <if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
</where> </where>-->
</select> </select>
<select id="selectUserByUserCode" parameterType="QcUserMaterial" resultMap="QcUserMaterialResult"> <select id="selectUserByUserCode" parameterType="QcUserMaterial" resultMap="QcUserMaterialResult">

Loading…
Cancel
Save