1.试剂表体积字段和相关接口返回
2.供应商订单修改试剂价格联动试剂原本价格一起变更
| | |
| | | System.out.println(this.viewOpeApply.getApplyPrice()); |
| | | try { |
| | | this.opeApplyService.updaetOpeApplyPrice(this.viewOpeApply.getApplyPrice(),this.viewOpeApply.getId()); |
| | | if (this.viewOpeApply.getReagent() != null && this.viewOpeApply.getReagent().getId() != null) { |
| | | sysReagentService.updateSysReagentPrice(this.viewOpeApply.getReagent().getId(), this.viewOpeApply.getApplyPrice()); |
| | | } |
| | | FacesUtils.info("修改成功。"); |
| | | refreshTable(); |
| | | RequestContext.getCurrentInstance().execute("PF('dialog').hide()"); |
| | |
| | | <result property="supplierName" column="supplierName"></result> |
| | | <result property="deadline" column="deadline"></result> |
| | | <result property="productHome" column="product_home"></result> |
| | | <result property="density" column="density"></result> |
| | | </association> |
| | | </resultMap> |
| | | |
| | |
| | | <select id="getOpeReagentStatusInfoList" parameterType="java.util.Map" resultMap="OpeReagentStatus"> |
| | | select s.id ,name,cas, deadline,reagent_code,bm3.meta_value reagent_format,r.main_metering,bm1.meta_value reagent_type,bm2.meta_value product_home, |
| | | bm4.meta_value reagent_unit, |
| | | r.density, |
| | | s.article_number |
| | | from ope_reagent_status s |
| | | left join sys_reagent r on r.id = s.reagent_id |
| | |
| | | </select> |
| | | |
| | | <insert id="insertOpeUseFlow" parameterType="com.nanometer.smartlab.entity.OpeUseFlow"> |
| | | insert into ope_use_flow(id, reagent_code, status, house_id, container_id, user_id, remainder, place, store_type, valid_flag, create_time, realstatus, operatestate |
| | | insert into ope_use_flow(id, reagent_code, status, house_id, container_id, user_id, remainder, place, store_type, valid_flag, create_time, realstatus, operatestate,volume |
| | | <if test="receiptNumber != null"> |
| | | ,receipt_number |
| | | </if> |
| | | ) |
| | | values (#{id}, #{reagentCode}, #{status}, #{houseId}, #{containerId}, #{userId}, #{remainder}, #{place}, #{storeType}, 1, #{createTime}, #{realstatus},#{operateState} |
| | | values (#{id}, #{reagentCode}, #{status}, #{houseId}, #{containerId}, #{userId}, #{remainder}, #{place}, #{storeType}, 1, #{createTime}, #{realstatus},#{operateState},#{volume} |
| | | <if test="receiptNumber != null"> |
| | | ,#{receiptNumber} |
| | | </if>) |
| | |
| | | SysReagent getSysReagentListNewRowData(@Param("id")String rowKey); |
| | | |
| | | List<Map> selectAll(Map params); |
| | | |
| | | void updateSysReagentPriceById(@Param("reagentId") String reagentId,@Param("price") BigDecimal price); |
| | | } |
| | |
| | | <result property="unitName" column="unitName"></result> |
| | | <result property="formatName" column="formatName"></result> |
| | | <result property="safetynum" column="safetynum"></result> |
| | | <result property="density" column="density"></result> |
| | | </resultMap> |
| | | |
| | | <sql id="queryWhereSql"> |
| | |
| | | |
| | | |
| | | <insert id="insertSysReagent" parameterType="com.nanometer.smartlab.entity.SysReagent"> |
| | | insert into sys_reagent(id, name, cas, reagent_type, reagent_character, supplier_id, reagent_format, main_metering, reagent_unit, price, per_box, memo, valid_flag, create_time, update_time,deadline, product_sn, dangerous_flag,control_products,product_home,type) |
| | | values (#{id}, #{name}, #{cas}, #{reagentType}, #{reagentCharacter}, #{supplierId}, #{reagentFormat}, #{mainMetering}, #{reagentUnit}, #{price}, #{perBox}, #{memo}, 1, now(), now(),#{deadline}, #{productSn}, #{dangerousFlag},#{controlProducts},#{productHome},#{type}) |
| | | insert into sys_reagent(id, name, cas, reagent_type, reagent_character, supplier_id, reagent_format, main_metering, reagent_unit, price, per_box, memo, valid_flag, create_time, update_time,deadline, product_sn, dangerous_flag,control_products,product_home,type,density) |
| | | values (#{id}, #{name}, #{cas}, #{reagentType}, #{reagentCharacter}, #{supplierId}, #{reagentFormat}, #{mainMetering}, #{reagentUnit}, #{price}, #{perBox}, #{memo}, 1, now(), now(),#{deadline}, #{productSn}, #{dangerousFlag},#{controlProducts},#{productHome},#{type},#{density}) |
| | | </insert> |
| | | |
| | | <update id="updateSysReagent" parameterType="com.nanometer.smartlab.entity.SysReagent"> |
| | | update sys_reagent set name=#{name}, cas=#{cas}, reagent_type=#{reagentType}, reagent_character=#{reagentCharacter}, supplier_id=#{supplierId}, reagent_format=#{reagentFormat}, |
| | | main_metering=#{mainMetering}, reagent_unit=#{reagentUnit}, price=#{price}, per_box=#{perBox}, memo=#{memo}, update_time=now(), deadline = #{deadline}, product_sn = #{productSn}, dangerous_flag = #{dangerousFlag}, control_products = #{controlProducts} |
| | | ,product_home=#{productHome},type=#{type} |
| | | ,product_home=#{productHome},type=#{type},density = #{density} |
| | | where id=#{id} |
| | | </update> |
| | | |
| | |
| | | set safetynum = #{safetynum} |
| | | where id = #{id} |
| | | </update> |
| | | <update id="updateSysReagentPriceById"> |
| | | update sys_reagent |
| | | set price = #{price} |
| | | where id = #{reagentId} |
| | | |
| | | <select id="countReagentByDetail" resultMap="SysReagent"> |
| | | </update> |
| | | |
| | | <select id="countReagentByDetail" resultMap="SysReagent"> |
| | | select |
| | | * |
| | | from sys_reagent as sr |
| | |
| | | private BigDecimal remainder; |
| | | private String place; |
| | | private StoreType storeType; |
| | | // 体积 |
| | | private BigDecimal volume; |
| | | |
| | | private SysReagent reagent; |
| | | private String userName; |
| | |
| | | public void setNote(String note) { |
| | | this.note = note; |
| | | } |
| | | |
| | | public BigDecimal getVolume() { |
| | | return volume; |
| | | } |
| | | |
| | | public void setVolume(BigDecimal volume) { |
| | | this.volume = volume; |
| | | } |
| | | } |
| | |
| | | private ValidFlag supplierFlag; |
| | | |
| | | |
| | | private BigDecimal density; |
| | | |
| | | |
| | | public void change(){ |
| | | if("1".equals(favor)){ |
| | | favor = "2"; |
| | |
| | | public void setSupplierFlag(ValidFlag supplierFlag) { |
| | | this.supplierFlag = supplierFlag; |
| | | } |
| | | |
| | | public BigDecimal getDensity() { |
| | | return density; |
| | | } |
| | | |
| | | public void setDensity(BigDecimal density) { |
| | | this.density = density; |
| | | } |
| | | } |
| | |
| | | import com.nanometer.smartlab.entity.SysReagent; |
| | | import com.nanometer.smartlab.entity.SysUser; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | boolean export2Excel(List<Map> list, Integer type) throws Exception; |
| | | |
| | | List<Map> selectAll(String name, String cas, String supplierId, Integer type, String productSn); |
| | | |
| | | void updateSysReagentPrice(String reagentId, BigDecimal applyPrice); |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | return sysReagentDao.selectAll(params); |
| | | } |
| | | |
| | | @Override |
| | | public void updateSysReagentPrice(String reagentId, BigDecimal applyPrice) { |
| | | sysReagentDao.updateSysReagentPriceById(reagentId, applyPrice); |
| | | } |
| | | |
| | | |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public int getSysReagentTotalCount(String name, String cas, String supplierId,Integer type) { |
| | |
| | | <p:column headerText="含税售价"> |
| | | <h:outputText value="#{row.price}"></h:outputText> |
| | | </p:column> |
| | | |
| | | <p:column headerText="密度g/ml" rendered="#{reagentMngController.type == 1}"> |
| | | <h:outputText value="#{row.density}" decimalPlaces="4" minValue="0" maxlength="6" ></h:outputText> |
| | | </p:column> |
| | | <!--<p:column headerText="每箱数量"> |
| | | <h:outputText value="#{row.perBox}"></h:outputText> |
| | | </p:column> |
| | |
| | | var="item" itemLabel="#{item.metaValue}" itemValue="#{item.id}"></f:selectItems> |
| | | </p:selectOneMenu>--> |
| | | </p:row> |
| | | |
| | | <p:row rendered="#{reagentMngController.action == constants.ACTION_ADD or reagentMngController.sysReagent.type == 1}"> |
| | | <p:column> |
| | | <p:outputLabel value="密度g/ml"/> |
| | | </p:column> |
| | | <p:column> |
| | | <p:inputNumber value="#{reagentMngController.sysReagent.density}" |
| | | decimalPlaces="4" minValue="0" maxlength="6" |
| | | /> |
| | | </p:column> |
| | | </p:row> |
| | | <!--<p:row> |
| | | <p:column> |
| | | <p:outputLabel value="种类"></p:outputLabel> |