申购管理申请履历显示所有历史单据,提交时如有无效试剂耗材报错
| | |
| | | import com.nanometer.smartlab.entity.SysReagent; |
| | | import com.nanometer.smartlab.entity.SysUser; |
| | | import com.nanometer.smartlab.entity.enumtype.ApplyStatus; |
| | | import com.nanometer.smartlab.entity.enumtype.ValidFlag; |
| | | import com.nanometer.smartlab.exception.BusinessException; |
| | | import com.nanometer.smartlab.service.*; |
| | | import com.nanometer.smartlab.util.Constants; |
| | |
| | | String applyUserId = getUserId(); |
| | | int count = 0; |
| | | if (StringUtils.isNotBlank(applyUserId)) { |
| | | count = opeApplyService.getOpeApplyTotalCount(null, null, null, null, applyUserId, null, null,applyCode,null,(byte)0); |
| | | count = opeApplyService.getOpeApplyTotalCount(null, null, null, null, applyUserId, null, null,applyCode,null,(byte)1); |
| | | } |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = opeApplyService.getOpeApplyList(null, null, null, null, applyUserId, null, null, first, pageSize,applyCode,null,(byte)0); |
| | | list = opeApplyService.getOpeApplyList(null, null, null, null, applyUserId, null, null, first, pageSize,applyCode,null,(byte)1); |
| | | } |
| | | selectedList = null; |
| | | } catch (Exception e) { |
| | |
| | | //申请一个申购编号 |
| | | String applyCode = this.sysSequenceService.getApplyCode(); |
| | | for (OpeApply opeApply : this.applyNewList) { |
| | | |
| | | if (opeApply.getReagent().getValidFlag() == null |
| | | ||opeApply.getReagent().getValidFlag().equals(ValidFlag.INVALID)){ |
| | | FacesUtils.warn(opeApply.getReagent().getName()+",该试剂已删除,请选择其他试剂"); |
| | | return; |
| | | } |
| | | if (opeApply.getReagent().getType() == 1 |
| | | && (opeApply.getReagent().getSupplierFlag() == null |
| | | || opeApply.getReagent().getSupplierFlag().equals(ValidFlag.INVALID))){ |
| | | FacesUtils.warn(opeApply.getReagent().getName()+",该试剂供应商已删除,请选择其他试剂"); |
| | | return; |
| | | } |
| | | opeApply.setId(IDUtils.uuid()); |
| | | opeApply.setApplyCode(applyCode); |
| | | opeApply.setApplyUserId(applyUser.getId()); |
| | |
| | | <result property="updateTime" column="update_time"></result> |
| | | <result property="validFlag" column="valid_flag" typeHandler="com.nanometer.smartlab.entity.handler.ValidFlagHandler"></result> |
| | | <result property="approveUserId" column="approve_user_id"></result> |
| | | <result property="beforeApproveUserId" column="before_approve_user_id"></result> |
| | | <result property="beforeApproveUserId" column="before_approve_user_id"></result> |
| | | <result property="memo" column="memo"></result> |
| | | <result property="applyUserName" column="applyUserName"></result> |
| | | <result property="approveUserName" column="approveUserName"></result> |
| | |
| | | <result property="productSn" column="reagentProductSn"></result> |
| | | <result property="controlProducts" column="controlProducts"></result> |
| | | <result property="dangerousFlag" column="reagentDangerousFlag" typeHandler="com.nanometer.smartlab.entity.handler.DangerousFlagHandler"></result> |
| | | <result property="productHome" column="productHome"></result> |
| | | <result property="productHomeName" column="productHomeName"></result> |
| | | <result property="productHome" column="productHome"></result> |
| | | <result property="productHomeName" column="productHomeName"></result> |
| | | <result property="type" column="type"></result> |
| | | <result property="supplierFlag" column="supplierFlag"></result> |
| | | </association> |
| | | </resultMap> |
| | | |
| | |
| | | ss.name as supplierName, |
| | | su.name as applyUserName, |
| | | suApprove.name as approveUserName, |
| | | bm.meta_value as productHomeName |
| | | bm.meta_value as productHomeName, |
| | | ss.valid_flag as supplierFlag, |
| | | sr.type as type |
| | | from ope_apply as oa |
| | | left join sys_reagent sr on oa.reagent_id = sr.id |
| | | left join sys_supplier as ss on sr.supplier_id = ss.id |
| | |
| | | su.name as applyUserName, |
| | | suApprove.name as approveUserName, |
| | | bm.meta_value as productHomeName, |
| | | fir.name as firName |
| | | fir.name as firName, |
| | | ss.valid_flag as supplierFlag, |
| | | sr.type as type |
| | | from ope_apply as oa |
| | | left join sys_reagent sr on oa.reagent_id = sr.id |
| | | left join sys_supplier as ss on sr.supplier_id = ss.id |
| | | left join sys_user as su on oa.apply_user_id = su.id |
| | | left join sys_user as suApprove on oa.approve_user_id = suApprove.id |
| | | left join sys_user as sys on sys.id=oa.before_approve_user_id |
| | | left join sys_user as fir on fir.id=oa.first_user |
| | | left join sys_user as sys on sys.id=oa.before_approve_user_id |
| | | left join sys_user as fir on fir.id=oa.first_user |
| | | left join base_meta as bm on sr.product_home = bm.id |
| | | where oa.valid_flag = 1 |
| | | <if test="isShow != null and isShow ==0"> |
| | |
| | | |
| | | import com.nanometer.smartlab.entity.enumtype.DangerousFlag; |
| | | import com.nanometer.smartlab.entity.enumtype.ValidFlag; |
| | | import sun.awt.SunHints; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.sql.Timestamp; |
| | | import java.util.Vector; |
| | | |
| | | /** |
| | | * Created by johnny on 17/11/23. |
| | |
| | | private String favor; |
| | | private Integer safetynum; |
| | | private Integer actualnum; |
| | | |
| | | private ValidFlag supplierFlag; |
| | | |
| | | |
| | | public void change(){ |
| | |
| | | } |
| | | |
| | | |
| | | public ValidFlag getSupplierFlag() { |
| | | return supplierFlag; |
| | | } |
| | | |
| | | public void setSupplierFlag(ValidFlag supplierFlag) { |
| | | this.supplierFlag = supplierFlag; |
| | | } |
| | | } |
| | |
| | | jdbc.url=jdbc:mysql://139.196.181.203:3306/gslab_smartlabdb_test?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false |
| | | jdbc.url=jdbc:mysql://139.196.181.203:3306/smartlabdb_test?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false |
| | | jdbc.username=root |
| | | jdbc.password=GKHY@root20201! |
| | | |
| | | institute.id = 2 |
| | | institute.name = \u6750\u6599\u79D1\u5B66\u59D1\u82CF\u5B9E\u9A8C\u5BA4 |
| | | institute.name = \u4E2D\u56FD\u79D1\u5B66\u9662\u82CF\u5DDE\u7EB3\u7C73\u6280\u672F\u4E0E\u7EB3\u7C73\u4EFF\u751F\u7814\u7A76\u6240 |
| | | institute.url = https://sinanoaq.cn:8002 |
| | | institute.app.id = |
| | | institute.app.secret = |